diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-04 19:12:22 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-16 00:07:09 +0300 |
commit | acc416ff7d405d9d3a8c90b3a78a0fb87f2979eb (patch) | |
tree | 1c8a9e7db4c29eb2a5ea5708a2a4f829df937b34 /drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | |
parent | 1300ab3927184bf871a5c6b3ceb30454a4498800 (diff) | |
download | linux-acc416ff7d405d9d3a8c90b3a78a0fb87f2979eb.tar.xz |
iio: imu: lsm6dsx: Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS()
These new functions move the burden of removing unused code when
CONFIG_PM_SLEEP is not defined onto the compiler rather than requiring
the use of CONFIG_PM guards and similar.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220220181522.541718-8-jic23@kernel.org
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20220604161223.461847-5-jic23@kernel.org
Diffstat (limited to 'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c')
-rw-r--r-- | drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c index 715fbdc8190e..5bd565b93a8c 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c @@ -134,7 +134,7 @@ MODULE_DEVICE_TABLE(i2c, st_lsm6dsx_i2c_id_table); static struct i2c_driver st_lsm6dsx_driver = { .driver = { .name = "st_lsm6dsx_i2c", - .pm = &st_lsm6dsx_pm_ops, + .pm = pm_sleep_ptr(&st_lsm6dsx_pm_ops), .of_match_table = st_lsm6dsx_i2c_of_match, }, .probe = st_lsm6dsx_i2c_probe, |