Skip to content

Commit 9730d7d

Browse files
HID: wacom: 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> [tatsunosuke.tobita@wacom.com: Imported into input-wacom (a864d16be156)] Signed-off-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/hid/wacom_sys.c?id=a864d16be15625df365a5945f566efc2e36f73c3
1 parent 08f9075 commit 9730d7d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

4.18/wacom_sys.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,7 +2942,9 @@ static void wacom_remove(struct hid_device *hdev)
29422942
wacom_release_resources(wacom);
29432943
}
29442944

2945+
#ifndef HAVE_PM_PTR
29452946
#ifdef CONFIG_PM
2947+
#endif
29462948
static int wacom_resume(struct hid_device *hdev)
29472949
{
29482950
struct wacom *wacom = hid_get_drvdata(hdev);
@@ -2962,17 +2964,24 @@ static int wacom_reset_resume(struct hid_device *hdev)
29622964
{
29632965
return wacom_resume(hdev);
29642966
}
2967+
#ifndef HAVE_PM_PTR
29652968
#endif /* CONFIG_PM */
2969+
#endif
29662970

29672971
static struct hid_driver wacom_driver = {
29682972
.name = "wacom",
29692973
.id_table = wacom_ids,
29702974
.probe = wacom_probe,
29712975
.remove = wacom_remove,
29722976
.report = wacom_wac_report,
2977+
#ifdef HAVE_PM_PTR
2978+
.resume = pm_ptr(wacom_resume),
2979+
.reset_resume = pm_ptr(wacom_reset_resume),
2980+
#else
29732981
#ifdef CONFIG_PM
29742982
.resume = wacom_resume,
29752983
.reset_resume = wacom_reset_resume,
2984+
#endif
29762985
#endif
29772986
.raw_event = wacom_raw_event,
29782987
};

0 commit comments

Comments
 (0)