Skip to content

Commit 371e67c

Browse files
ldewanganWolfram Sang
authored andcommitted
i2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEP
The CONFIG_PM doesn't actually enable any of the PM callbacks, it only allows to enable CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME. This means if CONFIG_PM is used to protect system sleep callbacks then it may end up unreferenced if only runtime PM is enabled. Hence protecting sleep callbacks with CONFIG_PM_SLEEP. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent ab5625c commit 371e67c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ static int __devexit tegra_i2c_remove(struct platform_device *pdev)
712712
return 0;
713713
}
714714

715-
#ifdef CONFIG_PM
715+
#ifdef CONFIG_PM_SLEEP
716716
static int tegra_i2c_suspend(struct device *dev)
717717
{
718718
struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);

0 commit comments

Comments
 (0)