]> git.dujemihanovic.xyz Git - linux.git/commit
Input: rmi4 - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 14 Jan 2023 17:16:09 +0000 (17:16 +0000)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Jan 2023 22:49:52 +0000 (14:49 -0800)
commit452fcd2dcb1d74de99608930397857204f1335e6
treed9f51808c119c78618f275023af815c484bcdfe1
parente2eaf9e0e10c8ce2b2740a89d1fab0649345e353
Input: rmi4 - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr()

SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated
as they requires explicit protection against unused function warnings.
The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS() /
RUNTIME_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to
be removed. Thus also drop the #ifdef guards.

Whilst all 3 sets of callbacks are similar, there are small differences
that make it challenging to use a single pm_dev_ops structure - hence
leave the duplication as it stands.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Andrew Duggan <aduggan@synaptics.com>
Link: https://lore.kernel.org/r/20230114171620.42891-6-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_i2c.c
drivers/input/rmi4/rmi_smbus.c
drivers/input/rmi4/rmi_spi.c