mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
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>
This commit is contained in:
parent
72f3d4c50c
commit
7e42d91c3b
|
|
@ -1422,7 +1422,6 @@ static int lenovo_probe(struct hid_device *hdev,
|
|||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user