HID: i2c-hid: Make suspend and resume into helper functions
authorDouglas Anderson <dianders@chromium.org>
Thu, 27 Jul 2023 17:16:34 +0000 (10:16 -0700)
committerDouglas Anderson <dianders@chromium.org>
Tue, 1 Aug 2023 14:40:19 +0000 (07:40 -0700)
commitd93d28477222d7cccd8a260c041561992f979dda
treeddc182edb2a4133cebd08751d21544c996d48cff
parent675cd877c952bcd0692016327230c38a16cbf33d
HID: i2c-hid: Make suspend and resume into helper functions

In a future patch we'd like to be able to call the current i2c-hid
suspend and resume functions from times other than system
suspend. Move the functions higher up in the file and have them take a
"struct i2c_hid" to make this simpler. We'll then add tiny wrappers of
the functions for use with system suspend.

This change is expected to have no functional effect.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230727101636.v4.7.I5c9894789b8b02f029bf266ae9b4f43c7907a173@changeid
drivers/hid/i2c-hid/i2c-hid-core.c