[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409213521.2218692-1-superm1@kernel.org>
Date: Wed, 9 Apr 2025 16:35:21 -0500
From: Mario Limonciello <superm1@...nel.org>
To: "Rafael J . Wysocki" <rjw@...ysocki.net>
Cc: Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org (open list:PIN CONTROL SUBSYSTEM),
linux-kernel@...r.kernel.org (open list),
linux-acpi@...r.kernel.org,
Basavaraj Natikar <Basavaraj.Natikar@....com>,
Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Mario Limonciello <mario.limonciello@....com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
From: Mario Limonciello <mario.limonciello@....com>
`pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
`CONFIG_PM_SLEEP` so the functions that use it need the same scope.
Adjust checks to look for both.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
drivers/pinctrl/pinctrl-amd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index b6fafed79b289..472a5aed4cd05 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -1209,7 +1209,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, gpio_dev);
acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
-#ifdef CONFIG_ACPI
+#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
acpi_register_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
#endif
@@ -1230,7 +1230,7 @@ static void amd_gpio_remove(struct platform_device *pdev)
gpiochip_remove(&gpio_dev->gc);
acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
-#ifdef CONFIG_ACPI
+#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
acpi_unregister_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
#endif
}
--
2.43.0
Powered by blists - more mailing lists