diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-01-14 18:16:20 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-01-27 23:49:53 +0100 |
commit | 47e79d310928ee21c0718cff5058251cd2dc71c0 (patch) | |
tree | d705e522cef2c67a368b952f1258d9d02ca76daa /drivers/input/touchscreen | |
parent | Input: cma3000 - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards (diff) | |
download | linux-47e79d310928ee21c0718cff5058251cd2dc71c0.tar.xz linux-47e79d310928ee21c0718cff5058251cd2dc71c0.zip |
Input: wistron_btns - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards
As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP
would have been a tighter protection. As pm_sleep_ptr() lets the compiler
see the protected ops structure and callbacks but also lets the compiler
remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef
guards to be removed, slightly simplifying the resulting code.
--
It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but
I'd prefer not to make that change unless someone can confirm that the
extra callbacks registered will have no unwanted side effects in this
driver.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230114171620.42891-17-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
0 files changed, 0 insertions, 0 deletions