]> git.baikalelectronics.ru Git - kernel.git/commit
iio: humidity: hts221: Use EXPORT_SIMPLE_DEV_PM_OPS() to allow compiler to remove...
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 4 Jun 2022 16:12:20 +0000 (17:12 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 15 Jun 2022 21:07:09 +0000 (22:07 +0100)
commit18d65e5485dfc96b0229c954b6019b5e51341f9b
tree403c6e85cc4acf0a2d478f0a31d813f687cef521
parentf9cb0bd99d714dd95a9642f3968ab2bb36a187f3
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
drivers/iio/humidity/hts221_core.c
drivers/iio/humidity/hts221_i2c.c
drivers/iio/humidity/hts221_spi.c