return devm_iio_device_register(&client->dev, indio_dev);
}
-static int __maybe_unused veml6030_runtime_suspend(struct device *dev)
+static int veml6030_runtime_suspend(struct device *dev)
{
int ret;
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
return ret;
}
-static int __maybe_unused veml6030_runtime_resume(struct device *dev)
+static int veml6030_runtime_resume(struct device *dev)
{
int ret;
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
return ret;
}
-static const struct dev_pm_ops veml6030_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
- pm_runtime_force_resume)
- SET_RUNTIME_PM_OPS(veml6030_runtime_suspend,
- veml6030_runtime_resume, NULL)
-};
+static DEFINE_RUNTIME_DEV_PM_OPS(veml6030_pm_ops, veml6030_runtime_suspend,
+ veml6030_runtime_resume, NULL);
static const struct of_device_id veml6030_of_match[] = {
{ .compatible = "vishay,veml6030" },
.driver = {
.name = "veml6030",
.of_match_table = veml6030_of_match,
- .pm = &veml6030_pm_ops,
+ .pm = pm_ptr(&veml6030_pm_ops),
},
.probe = veml6030_probe,
.id_table = veml6030_id,