return devm_iio_device_register(&spi->dev, indio_dev);
}
-static int __maybe_unused ltc2983_resume(struct device *dev)
+static int ltc2983_resume(struct device *dev)
{
struct ltc2983_data *st = spi_get_drvdata(to_spi_device(dev));
int dummy;
return ltc2983_setup(st, false);
}
-static int __maybe_unused ltc2983_suspend(struct device *dev)
+static int ltc2983_suspend(struct device *dev)
{
struct ltc2983_data *st = spi_get_drvdata(to_spi_device(dev));
return regmap_write(st->regmap, LTC2983_STATUS_REG, LTC2983_SLEEP);
}
-static SIMPLE_DEV_PM_OPS(ltc2983_pm_ops, ltc2983_suspend, ltc2983_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(ltc2983_pm_ops, ltc2983_suspend,
+ ltc2983_resume);
static const struct spi_device_id ltc2983_id_table[] = {
{ "ltc2983" },
.driver = {
.name = "ltc2983",
.of_match_table = ltc2983_of_match,
- .pm = <c2983_pm_ops,
+ .pm = pm_sleep_ptr(<c2983_pm_ops),
},
.probe = ltc2983_probe,
.id_table = ltc2983_id_table,