]> git.dujemihanovic.xyz Git - linux.git/commit
Input: adxl34x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 14 Jan 2023 17:16:12 +0000 (17:16 +0000)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Jan 2023 22:49:53 +0000 (14:49 -0800)
commit40be06463e3d7d26fb520b4b73ae6d86c1776d42
tree697f68f212ede105b9c1640d87b936b1e9cfbaa7
parentc0a150eee35f9a955cd47a737e97271ec262fd30
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>
drivers/input/misc/adxl34x-i2c.c
drivers/input/misc/adxl34x-spi.c
drivers/input/misc/adxl34x.c
drivers/input/misc/adxl34x.h