summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer/hmc5843.h
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-08-07 19:45:34 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-08-15 22:30:02 +0100
commit71041f73dc685ccaa7d150aa5eecc02609117739 (patch)
treefbab1d19aee4b8c0b70bd1f92c87e512c715c31e /drivers/iio/magnetometer/hmc5843.h
parentc3b4afb1825b120481798512dd6a647804c5e521 (diff)
downloadlinux-71041f73dc685ccaa7d150aa5eecc02609117739.tar.bz2
iio: magn: hmc5843: Move struct dev_pm_ops out of header
Having this structure defined static in the header lead to unnecessary duplication and required additional symbol exports. Use the EXPORT_NS_SIMPLE_DEV_PM_OPS() to clean this up in the same fashion as many other drivers do this. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220807184534.1037363-3-jic23@kernel.org
Diffstat (limited to 'drivers/iio/magnetometer/hmc5843.h')
-rw-r--r--drivers/iio/magnetometer/hmc5843.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/iio/magnetometer/hmc5843.h b/drivers/iio/magnetometer/hmc5843.h
index 9120c8bbf3dd..60fbb5431c88 100644
--- a/drivers/iio/magnetometer/hmc5843.h
+++ b/drivers/iio/magnetometer/hmc5843.h
@@ -52,16 +52,5 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
enum hmc5843_ids id, const char *name);
void hmc5843_common_remove(struct device *dev);
-int hmc5843_common_suspend(struct device *dev);
-int hmc5843_common_resume(struct device *dev);
-
-#ifdef CONFIG_PM_SLEEP
-static __maybe_unused SIMPLE_DEV_PM_OPS(hmc5843_pm_ops,
- hmc5843_common_suspend,
- hmc5843_common_resume);
-#define HMC5843_PM_OPS (&hmc5843_pm_ops)
-#else
-#define HMC5843_PM_OPS NULL
-#endif
-
+extern const struct dev_pm_ops hmc5843_pm_ops;
#endif /* HMC5843_CORE_H */