diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-09-25 20:27:45 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-09-26 00:22:12 +0300 |
commit | 29805956ee16b487dee57823d884df0bfe45ff69 (patch) | |
tree | 27c7bfc90a7b9ce3697791a2a84c9b1f5d98d28c /drivers/hwmon/adt7410.c | |
parent | 00f4095c967f00c5ad450569f66f0bb82cc97178 (diff) | |
download | linux-29805956ee16b487dee57823d884df0bfe45ff69.tar.xz |
hwmon: (adt7x10) Switch to EXPORT_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
These newer PM macros allow the compiler to see what code it can remove
if !CONFIG_PM_SLEEP. This allows the removal of messy #ifdef barriers whilst
achieving the same result.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20220925172759.3573439-5-jic23@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/adt7410.c')
-rw-r--r-- | drivers/hwmon/adt7410.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adt7410.c b/drivers/hwmon/adt7410.c index aede5baca7b9..0cebf6777239 100644 --- a/drivers/hwmon/adt7410.c +++ b/drivers/hwmon/adt7410.c @@ -98,7 +98,7 @@ static struct i2c_driver adt7410_driver = { .class = I2C_CLASS_HWMON, .driver = { .name = "adt7410", - .pm = ADT7X10_DEV_PM_OPS, + .pm = pm_sleep_ptr(&adt7x10_dev_pm_ops), }, .probe_new = adt7410_i2c_probe, .id_table = adt7410_ids, |