All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: button: replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS
@ 2026-09-08  1:46 Li Jun
  2026-09-09 15:16 ` Rafael J. Wysocki (Intel)
  2026-09-10  0:54 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Li Jun @ 2026-09-08  1:46 UTC (permalink / raw)
  To: lijun01, rafael, lenb, linux-acpi

Replace `#ifdef CONFIG_PM_SLEEP` boilerplate with the modern
`DEFINE_SIMPLE_DEV_PM_OPS()` macro in the acpi_button driver.

Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
 drivers/acpi/button.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index cdbb1023a8ee..15fc5d2ae467 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -161,14 +161,10 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
 static int acpi_button_probe(struct platform_device *pdev);
 static void acpi_button_remove(struct platform_device *pdev);
 
-#ifdef CONFIG_PM_SLEEP
 static int acpi_button_suspend(struct device *dev);
 static int acpi_button_resume(struct device *dev);
-#else
-#define acpi_button_suspend NULL
-#define acpi_button_resume NULL
-#endif
-static SIMPLE_DEV_PM_OPS(acpi_button_pm, acpi_button_suspend, acpi_button_resume);
+
+static DEFINE_SIMPLE_DEV_PM_OPS(acpi_button_pm, acpi_button_suspend, acpi_button_resume);
 
 static struct platform_driver acpi_button_driver = {
 	.probe = acpi_button_probe,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-10  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08  1:46 [PATCH] ACPI: button: replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS Li Jun
2026-09-09 15:16 ` Rafael J. Wysocki (Intel)
2026-09-10  0:54 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.