Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: dac: max517: avoid using CONFIG_PM_SLEEP

This is already handled by SIMPLE_DEV_PM_OPS().

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marcus Folkesson and committed by
Jonathan Cameron
fe8a5420 9920ed25

+3 -8
+3 -8
drivers/iio/dac/max517.c
··· 113 113 return ret; 114 114 } 115 115 116 - #ifdef CONFIG_PM_SLEEP 117 - static int max517_suspend(struct device *dev) 116 + static int __maybe_unused max517_suspend(struct device *dev) 118 117 { 119 118 u8 outbuf = COMMAND_PD; 120 119 121 120 return i2c_master_send(to_i2c_client(dev), &outbuf, 1); 122 121 } 123 122 124 - static int max517_resume(struct device *dev) 123 + static int __maybe_unused max517_resume(struct device *dev) 125 124 { 126 125 u8 outbuf = 0; 127 126 ··· 128 129 } 129 130 130 131 static SIMPLE_DEV_PM_OPS(max517_pm_ops, max517_suspend, max517_resume); 131 - #define MAX517_PM_OPS (&max517_pm_ops) 132 - #else 133 - #define MAX517_PM_OPS NULL 134 - #endif 135 132 136 133 static const struct iio_info max517_info = { 137 134 .read_raw = max517_read_raw, ··· 224 229 static struct i2c_driver max517_driver = { 225 230 .driver = { 226 231 .name = MAX517_DRV_NAME, 227 - .pm = MAX517_PM_OPS, 232 + .pm = &max517_pm_ops, 228 233 }, 229 234 .probe = max517_probe, 230 235 .remove = max517_remove,