Skip to content

Commit 7e42d91

Browse files
hadessJiri Kosina
authored andcommitted
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>
1 parent 72f3d4c commit 7e42d91

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/hid/hid-lenovo.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,6 @@ static int lenovo_probe(struct hid_device *hdev,
14221422
return ret;
14231423
}
14241424

1425-
#ifdef CONFIG_PM
14261425
static int lenovo_reset_resume(struct hid_device *hdev)
14271426
{
14281427
switch (hdev->product) {
@@ -1438,7 +1437,6 @@ static int lenovo_reset_resume(struct hid_device *hdev)
14381437

14391438
return 0;
14401439
}
1441-
#endif
14421440

14431441
static void lenovo_remove_tpkbd(struct hid_device *hdev)
14441442
{
@@ -1570,9 +1568,7 @@ static struct hid_driver lenovo_driver = {
15701568
.raw_event = lenovo_raw_event,
15711569
.event = lenovo_event,
15721570
.report_fixup = lenovo_report_fixup,
1573-
#ifdef CONFIG_PM
1574-
.reset_resume = lenovo_reset_resume,
1575-
#endif
1571+
.reset_resume = pm_ptr(lenovo_reset_resume),
15761572
};
15771573
module_hid_driver(lenovo_driver);
15781574

0 commit comments

Comments
 (0)