}
}
-static int __maybe_unused max5821_suspend(struct device *dev)
+static int max5821_suspend(struct device *dev)
{
u8 outbuf[2] = { MAX5821_EXTENDED_COMMAND_MODE,
MAX5821_EXTENDED_DAC_A |
return i2c_master_send(to_i2c_client(dev), outbuf, 2);
}
-static int __maybe_unused max5821_resume(struct device *dev)
+static int max5821_resume(struct device *dev)
{
u8 outbuf[2] = { MAX5821_EXTENDED_COMMAND_MODE,
MAX5821_EXTENDED_DAC_A |
return i2c_master_send(to_i2c_client(dev), outbuf, 2);
}
-static SIMPLE_DEV_PM_OPS(max5821_pm_ops, max5821_suspend, max5821_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(max5821_pm_ops, max5821_suspend,
+ max5821_resume);
static const struct iio_info max5821_info = {
.read_raw = max5821_read_raw,
.driver = {
.name = "max5821",
.of_match_table = max5821_of_match,
- .pm = &max5821_pm_ops,
+ .pm = pm_sleep_ptr(&max5821_pm_ops),
},
.probe = max5821_probe,
.id_table = max5821_id,