summaryrefslogtreecommitdiff
path: root/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/proximity/pulsedlight-lidar-lite-v2.c')
-rw-r--r--drivers/iio/proximity/pulsedlight-lidar-lite-v2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
index 27026c060ab9..648ae576d6fa 100644
--- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
+++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
@@ -338,7 +338,6 @@ static const struct of_device_id lidar_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, lidar_dt_ids);
-#ifdef CONFIG_PM
static int lidar_pm_runtime_suspend(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
@@ -358,18 +357,16 @@ static int lidar_pm_runtime_resume(struct device *dev)
return ret;
}
-#endif
static const struct dev_pm_ops lidar_pm_ops = {
- SET_RUNTIME_PM_OPS(lidar_pm_runtime_suspend,
- lidar_pm_runtime_resume, NULL)
+ RUNTIME_PM_OPS(lidar_pm_runtime_suspend, lidar_pm_runtime_resume, NULL)
};
static struct i2c_driver lidar_driver = {
.driver = {
.name = LIDAR_DRV_NAME,
.of_match_table = lidar_dt_ids,
- .pm = &lidar_pm_ops,
+ .pm = pm_ptr(&lidar_pm_ops),
},
.probe = lidar_probe,
.remove = lidar_remove,