aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-12-22 20:48:42 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-12-28 17:29:26 +0000
commit9f9d1eac4980389daafae2b90f33ba4ed8c24c73 (patch)
tree227ba5ec55a9df22238db0282f95b8651184d600
parent2cf1b06fa3dc3445df68553c351465b4f6ce5e64 (diff)
downloadiio-input-pm-only.tar.gz
-rw-r--r--drivers/power/supply/88pm860x_battery.c8
-rw-r--r--drivers/rtc/rtc-88pm860x.c7
2 files changed, 6 insertions, 9 deletions
diff --git a/drivers/power/supply/88pm860x_battery.c b/drivers/power/supply/88pm860x_battery.c
index f3f3f8cd1a7f87..a81ace78c06751 100644
--- a/drivers/power/supply/88pm860x_battery.c
+++ b/drivers/power/supply/88pm860x_battery.c
@@ -978,7 +978,6 @@ static int pm860x_battery_probe(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int pm860x_battery_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -998,15 +997,14 @@ static int pm860x_battery_resume(struct device *dev)
chip->wakeup_flag &= ~(1 << PM8607_IRQ_CC);
return 0;
}
-#endif
-static SIMPLE_DEV_PM_OPS(pm860x_battery_pm_ops,
- pm860x_battery_suspend, pm860x_battery_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_battery_pm_ops,
+ pm860x_battery_suspend, pm860x_battery_resume);
static struct platform_driver pm860x_battery_driver = {
.driver = {
.name = "88pm860x-battery",
- .pm = &pm860x_battery_pm_ops,
+ .pm = pm_sleep_ptr(&pm860x_battery_pm_ops),
},
.probe = pm860x_battery_probe,
};
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c
index 2c809a1a445e88..31439a63046441 100644
--- a/drivers/rtc/rtc-88pm860x.c
+++ b/drivers/rtc/rtc-88pm860x.c
@@ -344,7 +344,6 @@ static int pm860x_rtc_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int pm860x_rtc_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -363,14 +362,14 @@ static int pm860x_rtc_resume(struct device *dev)
chip->wakeup_flag &= ~(1 << PM8607_IRQ_RTC);
return 0;
}
-#endif
-static SIMPLE_DEV_PM_OPS(pm860x_rtc_pm_ops, pm860x_rtc_suspend, pm860x_rtc_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_rtc_pm_ops,
+ pm860x_rtc_suspend, pm860x_rtc_resume);
static struct platform_driver pm860x_rtc_driver = {
.driver = {
.name = "88pm860x-rtc",
- .pm = &pm860x_rtc_pm_ops,
+ .pm = pm_sleep_ptr(&pm860x_rtc_pm_ops),
},
.probe = pm860x_rtc_probe,
.remove = pm860x_rtc_remove,