[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260112105500.3664834-13-hadess@hadess.net>
Date: Mon, 12 Jan 2026 11:53:01 +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 12/12] HID: surface: Use pm_ptr_sleep instead of #ifdef CONFIG_PM_SLEEP
This increases build coverage and allows to drop an #ifdef.
Signed-off-by: Bastien Nocera <hadess@...ess.net>
---
drivers/hid/surface-hid/surface_hid.c | 2 +-
drivers/hid/surface-hid/surface_hid_core.c | 5 -----
drivers/hid/surface-hid/surface_kbd.c | 2 +-
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/hid/surface-hid/surface_hid.c b/drivers/hid/surface-hid/surface_hid.c
index eae47e0d95ed..21904612b5ad 100644
--- a/drivers/hid/surface-hid/surface_hid.c
+++ b/drivers/hid/surface-hid/surface_hid.c
@@ -241,7 +241,7 @@ static struct ssam_device_driver surface_hid_driver = {
.match_table = surface_hid_match,
.driver = {
.name = "surface_hid",
- .pm = &surface_hid_pm_ops,
+ .pm = pm_ptr_sleep(&surface_hid_pm_ops),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
diff --git a/drivers/hid/surface-hid/surface_hid_core.c b/drivers/hid/surface-hid/surface_hid_core.c
index 6690c24f28f0..33fe15fbcf6c 100644
--- a/drivers/hid/surface-hid/surface_hid_core.c
+++ b/drivers/hid/surface-hid/surface_hid_core.c
@@ -281,11 +281,6 @@ const struct dev_pm_ops surface_hid_pm_ops = {
};
EXPORT_SYMBOL_GPL(surface_hid_pm_ops);
-#else /* CONFIG_PM_SLEEP */
-
-const struct dev_pm_ops surface_hid_pm_ops = { };
-EXPORT_SYMBOL_GPL(surface_hid_pm_ops);
-
#endif /* CONFIG_PM_SLEEP */
MODULE_AUTHOR("Maximilian Luz <luzmaximilian@...il.com>");
diff --git a/drivers/hid/surface-hid/surface_kbd.c b/drivers/hid/surface-hid/surface_kbd.c
index 0be01b5e7425..6ab6870f10e8 100644
--- a/drivers/hid/surface-hid/surface_kbd.c
+++ b/drivers/hid/surface-hid/surface_kbd.c
@@ -288,7 +288,7 @@ static struct platform_driver surface_kbd_driver = {
.driver = {
.name = "surface_keyboard",
.acpi_match_table = surface_kbd_match,
- .pm = &surface_hid_pm_ops,
+ .pm = pm_ptr_sleep(&surface_hid_pm_ops),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
--
2.52.0
Powered by blists - more mailing lists