Skip to content

Commit a889ee1

Browse files
committed
HID: i2c-hid: Switch to SYSTEM_SLEEP_PM_OPS()
The SYSTEM_SLEEP_PM_OPS() allows us to get rid of '#ifdef CONFIG_PM_SLEEP', as talked about in commit 1a3c7bb ("PM: core: Add new *_PM_OPS macros, deprecate old ones"). This change is expected to have no functional effect. Reviewed-by: Maxime Ripard <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230727101636.v4.5.Ib2a2865bd3c0b068432259dfc7d76cebcbb512be@changeid
1 parent fbf0ea2 commit a889ee1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/hid/i2c-hid/i2c-hid-core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,6 @@ void i2c_hid_core_shutdown(struct i2c_client *client)
10851085
}
10861086
EXPORT_SYMBOL_GPL(i2c_hid_core_shutdown);
10871087

1088-
#ifdef CONFIG_PM_SLEEP
10891088
static int i2c_hid_core_suspend(struct device *dev)
10901089
{
10911090
struct i2c_client *client = to_i2c_client(dev);
@@ -1138,10 +1137,9 @@ static int i2c_hid_core_resume(struct device *dev)
11381137

11391138
return hid_driver_reset_resume(hid);
11401139
}
1141-
#endif
11421140

11431141
const struct dev_pm_ops i2c_hid_core_pm = {
1144-
SET_SYSTEM_SLEEP_PM_OPS(i2c_hid_core_suspend, i2c_hid_core_resume)
1142+
SYSTEM_SLEEP_PM_OPS(i2c_hid_core_suspend, i2c_hid_core_resume)
11451143
};
11461144
EXPORT_SYMBOL_GPL(i2c_hid_core_pm);
11471145

0 commit comments

Comments
 (0)