From ca5340ae77b42f03bd616be254c34bbf5c6415ca Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 20 Mar 2013 15:08:10 +1100 Subject: [PATCH] drivers/rtc/rtc-tegra.c: protect suspend/resume callbacks with CONFIG_PM_SLEEP 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 Reviewed-by: Thierry Reding Reviewed-by: Stephen Warren Cc: Jingoo Han Signed-off-by: Andrew Morton --- drivers/rtc/rtc-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index 9447d65fe2b1..916802a58366 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c @@ -390,7 +390,7 @@ static int __exit tegra_rtc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int tegra_rtc_suspend(struct platform_device *pdev, pm_message_t state) { struct device *dev = &pdev->dev; @@ -446,7 +446,7 @@ static struct platform_driver tegra_rtc_driver = { .owner = THIS_MODULE, .of_match_table = tegra_rtc_dt_match, }, -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP .suspend = tegra_rtc_suspend, .resume = tegra_rtc_resume, #endif -- 2.39.5