power: rk817-battery: fix compile error whitout CONFIG_SUSPEND

drivers/power/rk817_battery.c:3254:12: warning: 'rk817_bat_pm_resume' defined but not used [-Wunused-function]
error, forbidden warning:rk817_battery.c:3254
 static int rk817_bat_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/power/rk817_battery.c:3037:13: warning: 'rk817_bat_pm_suspend' defined but not used [-Wunused-function]
error, forbidden warning:rk817_battery.c:3037
 static int  rk817_bat_pm_suspend(struct device *dev)

Change-Id: I8cb39c95688e16027257c09a20eaeb100bd1024b
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
Ziyuan Xu
2019-03-20 15:48:25 +08:00
committed by Tao Huang
parent 8b8d1e98f5
commit 4aac5d2e7c

View File

@@ -3034,8 +3034,7 @@ static time_t rk817_get_rtc_sec(void)
return sec;
}
#ifdef CONFIG_PM_SLEEP
static int rk817_bat_pm_suspend(struct device *dev)
static int __maybe_unused rk817_bat_pm_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct rk817_battery_device *battery = dev_get_drvdata(&pdev->dev);
@@ -3252,7 +3251,7 @@ static int rk817_bat_sleep_dischrg(struct rk817_battery_device *battery)
return sleep_soc;
}
static int rk817_bat_pm_resume(struct device *dev)
static int __maybe_unused rk817_bat_pm_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct rk817_battery_device *battery = dev_get_drvdata(&pdev->dev);
@@ -3305,7 +3304,6 @@ static int rk817_bat_pm_resume(struct device *dev)
return 0;
}
#endif
static SIMPLE_DEV_PM_OPS(rk817_bat_pm_ops,
rk817_bat_pm_suspend,