summaryrefslogtreecommitdiff
path: root/drivers/input/misc/adxl34x.h
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2023-01-14 20:16:12 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-01-28 01:49:53 +0300
commit40be06463e3d7d26fb520b4b73ae6d86c1776d42 (patch)
tree697f68f212ede105b9c1640d87b936b1e9cfbaa7 /drivers/input/misc/adxl34x.h
parentc0a150eee35f9a955cd47a737e97271ec262fd30 (diff)
downloadlinux-40be06463e3d7d26fb520b4b73ae6d86c1776d42.tar.xz
Input: adxl34x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS()
The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20230114171620.42891-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/adxl34x.h')
-rw-r--r--drivers/input/misc/adxl34x.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/adxl34x.h b/drivers/input/misc/adxl34x.h
index febf85270fff..f9272a2e7a96 100644
--- a/drivers/input/misc/adxl34x.h
+++ b/drivers/input/misc/adxl34x.h
@@ -20,11 +20,11 @@ struct adxl34x_bus_ops {
int (*write)(struct device *, unsigned char, unsigned char);
};
-void adxl34x_suspend(struct adxl34x *ac);
-void adxl34x_resume(struct adxl34x *ac);
struct adxl34x *adxl34x_probe(struct device *dev, int irq,
bool fifo_delay_default,
const struct adxl34x_bus_ops *bops);
void adxl34x_remove(struct adxl34x *ac);
+extern const struct dev_pm_ops adxl34x_pm;
+
#endif