summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2026-01-13 10:24:52 +0100
committerJiri Kosina <jkosina@suse.cz>2026-01-28 19:23:16 +0100
commit7e42d91c3b2eb959e1e9787ee808a1824aab0cb6 (patch)
tree684070871548796b14fda6267efeb5b43e8dabb1 /drivers/hid
parent72f3d4c50cfa8ff3f54d8ac6c2e15d1962091368 (diff)
HID: lenovo: Use pm_ptr instead of #ifdef CONFIG_PM
This increases build coverage and allows to drop an #ifdef. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-lenovo.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 9cc3e029e9f6..a6b73e03c16b 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -1422,7 +1422,6 @@ err:
return ret;
}
-#ifdef CONFIG_PM
static int lenovo_reset_resume(struct hid_device *hdev)
{
switch (hdev->product) {
@@ -1438,7 +1437,6 @@ static int lenovo_reset_resume(struct hid_device *hdev)
return 0;
}
-#endif
static void lenovo_remove_tpkbd(struct hid_device *hdev)
{
@@ -1570,9 +1568,7 @@ static struct hid_driver lenovo_driver = {
.raw_event = lenovo_raw_event,
.event = lenovo_event,
.report_fixup = lenovo_report_fixup,
-#ifdef CONFIG_PM
- .reset_resume = lenovo_reset_resume,
-#endif
+ .reset_resume = pm_ptr(lenovo_reset_resume),
};
module_hid_driver(lenovo_driver);