Skip to content
Commit ebbdbef2 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Dmitry Torokhov
Browse files

Input: cyttsp4 - use EXPORT_GPL_RUNTIME_DEV_PM_OPS()



SET_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() are deprecated as
they requires explicit protection against unused function warnings.
The new combination of pm_ptr() EXPORT_GPL_RUNTIME_DEV_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.

Note that we are replacing an unconditional call to the suspend
and resume functions for sleep use cases with one via
pm_runtime_force_suspend() / pm_runtime_force_resume() that only
do anything to the device if we are not already in the appropriate
runtime suspended state.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>

--

I 'think' this should be fine in that it can only reduce the number
of unnecessary suspends.  If anyone can test that would be great.

Link: https://lore.kernel.org/r/20230114171620.42891-11-jic23@kernel.org


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 6470215b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment