diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-04 19:12:20 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-16 00:07:09 +0300 |
commit | 2129f25de5821677728689cabf01d74bc9c042cc (patch) | |
tree | 403c6e85cc4acf0a2d478f0a31d813f687cef521 /drivers/iio/humidity/hts221_i2c.c | |
parent | cb490b10c3fdd3d700e379d8be8b8d7e4662cff2 (diff) | |
download | linux-2129f25de5821677728689cabf01d74bc9c042cc.tar.xz |
iio: humidity: hts221: Use EXPORT_SIMPLE_DEV_PM_OPS() to allow compiler to remove dead code.
If CONFIG_PM_SLEEP is not defined using EXPORT_SIMPLE_DEV_PM_OPS()
in conjunction with pm_sleep_ptr() allows the compiler to remove
the unused code and data. This removes the need for __maybe_unused
markings etc.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20220220181522.541718-6-jic23@kernel.org
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20220604161223.461847-3-jic23@kernel.org
Diffstat (limited to 'drivers/iio/humidity/hts221_i2c.c')
-rw-r--r-- | drivers/iio/humidity/hts221_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/humidity/hts221_i2c.c b/drivers/iio/humidity/hts221_i2c.c index cab39c4756f8..933b05e4d972 100644 --- a/drivers/iio/humidity/hts221_i2c.c +++ b/drivers/iio/humidity/hts221_i2c.c @@ -62,7 +62,7 @@ MODULE_DEVICE_TABLE(i2c, hts221_i2c_id_table); static struct i2c_driver hts221_driver = { .driver = { .name = "hts221_i2c", - .pm = &hts221_pm_ops, + .pm = pm_sleep_ptr(&hts221_pm_ops), .of_match_table = hts221_i2c_of_match, .acpi_match_table = ACPI_PTR(hts221_acpi_match), }, |