]> git.baikalelectronics.ru Git - kernel.git/commit
iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 21 Jun 2022 20:27:09 +0000 (21:27 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 18 Jul 2022 17:48:18 +0000 (18:48 +0100)
commitb0cf23ef405543c50a54ffdc1c32b094c3394853
tree6542653b281f1db79bc2ca25f5294cae8ff763b6
parent260b02d91867a6990f044a7cc96942af9eaff6e3
iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc

Letting the compiler remove these functions when the kernel is built
without CONFIG_PM support is simpler and less error prone than the
use of #ifdef based config guards.

Removing instances of this approach from IIO also stops them being
copied into new drivers.

Very likely it would be safe to use DEFINE_RUNTIME_DEV_PM_OPS() here,
but that would be a functional change.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20220621202719.13644-27-jic23@kernel.org
drivers/iio/light/us5182d.c