Skip to content

Commit d1de9bd

Browse files
hadessJiri Kosina
authored andcommitted
HID: uclogic: 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 b3e5bcf commit d1de9bd

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/hid/hid-uclogic-core.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ static int uclogic_probe(struct hid_device *hdev,
268268
return rc;
269269
}
270270

271-
#ifdef CONFIG_PM
272271
static int uclogic_resume(struct hid_device *hdev)
273272
{
274273
int rc;
@@ -283,7 +282,6 @@ static int uclogic_resume(struct hid_device *hdev)
283282

284283
return rc;
285284
}
286-
#endif
287285

288286
/**
289287
* uclogic_exec_event_hook - if the received event is hooked schedules the
@@ -636,10 +634,8 @@ static struct hid_driver uclogic_driver = {
636634
.raw_event = uclogic_raw_event,
637635
.input_mapping = uclogic_input_mapping,
638636
.input_configured = uclogic_input_configured,
639-
#ifdef CONFIG_PM
640-
.resume = uclogic_resume,
641-
.reset_resume = uclogic_resume,
642-
#endif
637+
.resume = pm_ptr(uclogic_resume),
638+
.reset_resume = pm_ptr(uclogic_resume),
643639
};
644640
module_hid_driver(uclogic_driver);
645641

0 commit comments

Comments
 (0)