iio: gyro: mpu3050: Use pm_ptr() and DEFINE_RUNTIME_DEV_PM_OPS()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 20 Feb 2022 17:51:49 +0000 (17:51 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Jun 2022 10:53:10 +0000 (11:53 +0100)
commitfeb0bd2bcab6a3970422c3baf0bdc77713e547f9
tree8c423e8408b28c4c0429b852e71825947a7579ab
parent3c5a15cc4bd7818d8ab149fe03e65d4ad452ed83
iio: gyro: mpu3050: Use pm_ptr() and DEFINE_RUNTIME_DEV_PM_OPS()

Using this approach as opposed to CONFIG_PM guards allows the compiler to
remove the unused code instead of doing it manually.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220220175149.503495-3-jic23@kernel.org
drivers/iio/gyro/mpu3050-core.c
drivers/iio/gyro/mpu3050-i2c.c