]> git.dujemihanovic.xyz Git - linux.git/commit
Input: Use pm_sleep_ptr() to avoid need for ifdef CONFIG_PM_SLEEP
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 14 Jan 2023 17:16:18 +0000 (17:16 +0000)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Jan 2023 22:49:53 +0000 (14:49 -0800)
commit345c7b741c4631fad38bb8dc8d6659ac05d92380
treefd8c848684f1ad862bc86a7e5c2537e2b655a0bc
parentf31e7388dd1633ed2273cc5c6a99f225ec1a5350
Input: Use pm_sleep_ptr() to avoid need for ifdef CONFIG_PM_SLEEP

As the new pm_sleep_ptr() macro lets the compiler see the code, but
then remove it if !CONFIG_PM_SLEEP it can be used to avoid the need
for #ifdef guards.  Use that in the input core to simplify the code
a little.  Note pm_sleep_ptr() has not been applied to each callback
in the ops structure because the pm_sleep_ptr() at the usage site
is sufficient.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230114171620.42891-15-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c