diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-08-07 21:45:34 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-08-16 00:30:02 +0300 |
commit | 71041f73dc685ccaa7d150aa5eecc02609117739 (patch) | |
tree | fbab1d19aee4b8c0b70bd1f92c87e512c715c31e /drivers/iio/magnetometer/hmc5843.h | |
parent | c3b4afb1825b120481798512dd6a647804c5e521 (diff) | |
download | linux-71041f73dc685ccaa7d150aa5eecc02609117739.tar.xz |
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.h | 13 |
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 */ |