This increases build coverage and allows to drop an #ifdef.
Signed-off-by: Bastien Nocera <hadess@hadess.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@gmail.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