[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260113092546.265734-12-hadess@hadess.net>
Date: Tue, 13 Jan 2026 10:24:59 +0100
From: Bastien Nocera <hadess@...ess.net>
To: linux-input@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Bastien Nocera <hadess@...ess.net>
Subject: [PATCH v2 11/11] HID: sony: Use pm_ptr instead of #ifdef CONFIG_PM
This increases build coverage and allows to drop an #ifdef.
Signed-off-by: Bastien Nocera <hadess@...ess.net>
---
drivers/hid/hid-sony.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index b966e4044238..de8135c1e3df 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2179,7 +2179,6 @@ static void sony_remove(struct hid_device *hdev)
hid_hw_stop(hdev);
}
-#ifdef CONFIG_PM
static int sony_suspend(struct hid_device *hdev, pm_message_t message)
{
@@ -2214,8 +2213,6 @@ static int sony_resume(struct hid_device *hdev)
return 0;
}
-#endif
-
static const struct hid_device_id sony_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER),
.driver_data = SIXAXIS_CONTROLLER_USB },
@@ -2284,12 +2281,9 @@ static struct hid_driver sony_driver = {
.remove = sony_remove,
.report_fixup = sony_report_fixup,
.raw_event = sony_raw_event,
-
-#ifdef CONFIG_PM
- .suspend = sony_suspend,
- .resume = sony_resume,
- .reset_resume = sony_resume,
-#endif
+ .suspend = pm_ptr(sony_suspend),
+ .resume = pm_ptr(sony_resume),
+ .reset_resume = pm_ptr(sony_resume),
};
static int __init sony_init(void)
--
2.52.0
Powered by blists - more mailing lists