Commit b6ec220c authored by Marcus Folkesson's avatar Marcus Folkesson Committed by Jonathan Cameron

iio: dac: max5821: avoid using CONFIG_PM_SLEEP

This is already handled by SIMPLE_DEV_PM_OPS().
Signed-off-by: default avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent fe8a5420
...@@ -270,8 +270,7 @@ static int max5821_write_raw(struct iio_dev *indio_dev, ...@@ -270,8 +270,7 @@ static int max5821_write_raw(struct iio_dev *indio_dev,
} }
} }
#ifdef CONFIG_PM_SLEEP static int __maybe_unused max5821_suspend(struct device *dev)
static int max5821_suspend(struct device *dev)
{ {
u8 outbuf[2] = { MAX5821_EXTENDED_COMMAND_MODE, u8 outbuf[2] = { MAX5821_EXTENDED_COMMAND_MODE,
MAX5821_EXTENDED_DAC_A | MAX5821_EXTENDED_DAC_A |
...@@ -281,7 +280,7 @@ static int max5821_suspend(struct device *dev) ...@@ -281,7 +280,7 @@ static int max5821_suspend(struct device *dev)
return i2c_master_send(to_i2c_client(dev), outbuf, 2); return i2c_master_send(to_i2c_client(dev), outbuf, 2);
} }
static int max5821_resume(struct device *dev) static int __maybe_unused max5821_resume(struct device *dev)
{ {
u8 outbuf[2] = { MAX5821_EXTENDED_COMMAND_MODE, u8 outbuf[2] = { MAX5821_EXTENDED_COMMAND_MODE,
MAX5821_EXTENDED_DAC_A | MAX5821_EXTENDED_DAC_A |
...@@ -292,10 +291,6 @@ static int max5821_resume(struct device *dev) ...@@ -292,10 +291,6 @@ static int max5821_resume(struct device *dev)
} }
static SIMPLE_DEV_PM_OPS(max5821_pm_ops, max5821_suspend, max5821_resume); static SIMPLE_DEV_PM_OPS(max5821_pm_ops, max5821_suspend, max5821_resume);
#define MAX5821_PM_OPS (&max5821_pm_ops)
#else
#define MAX5821_PM_OPS NULL
#endif /* CONFIG_PM_SLEEP */
static const struct iio_info max5821_info = { static const struct iio_info max5821_info = {
.read_raw = max5821_read_raw, .read_raw = max5821_read_raw,
...@@ -392,7 +387,7 @@ static struct i2c_driver max5821_driver = { ...@@ -392,7 +387,7 @@ static struct i2c_driver max5821_driver = {
.driver = { .driver = {
.name = "max5821", .name = "max5821",
.of_match_table = max5821_of_match, .of_match_table = max5821_of_match,
.pm = MAX5821_PM_OPS, .pm = &max5821_pm_ops,
}, },
.probe = max5821_probe, .probe = max5821_probe,
.remove = max5821_remove, .remove = max5821_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment