pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
Subsystems (4)
PATCH v2 1/1 pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
From: Mario Limonciello <[email protected]>
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, and while updating make it CONFIG_SUSPEND instead as that's what the acpi header uses.
---
v2:
Use CONFIG_SUSPEND instead of CONFIG_PM_SLEEP
--- drivers/pinctrl/pinctrl-amd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/pinctrl/pinctrl-amd.c +7 -5
@@ -37,7 +37,9 @@#include "pinctrl-utils.h" #include "pinctrl-amd.h" +#ifdef CONFIG_SUSPEND static struct amd_gpio *pinctrl_dev; +#endif static int amd_gpio_get_direction (struct gpio_chip *gc,unsigned offset) {
@@ -892,7 +894,7 @@ static void amd_gpio_irq_init(struct amd_gpio *gpio_dev) } } -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_SUSPEND static bool amd_gpio_should_save (struct amd_gpio *gpio_dev,unsigned int pin) {const struct pin_desc *pd =pin_desc_get (gpio_dev->pctrl, pin);
@@ -1143,7 +1145,7 @@ static int amd_gpio_probe(struct platform_device *pdev)if (gpio_dev->irq <0 )return gpio_dev->irq; -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_SUSPEND gpio_dev->saved_regs =devm_kcalloc (&pdev->dev, amd_pinctrl_desc.npins,sizeof (*gpio_dev->saved_regs),GFP_KERNEL );
@@ -1209,7 +1211,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_SUSPEND )acpi_register_lps0_dev (&pinctrl_amd_s2idle_dev_ops);#endif
@@ -1230,7 +1232,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_SUSPEND )acpi_unregister_lps0_dev (&pinctrl_amd_s2idle_dev_ops);#endif }
@@ -1249,7 +1251,7 @@ static struct platform_driver amd_gpio_driver = { .driver = { .name = "amd_gpio", .acpi_match_table = ACPI_PTR(amd_gpio_acpi_match), -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_SUSPEND .pm = &amd_gpio_pm_ops,#endif },
Signature · 1 line
2.43.0
Quoted 8 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
pinctrl_amd_s2idle_dev_opsis hidden under bothCONFIG_ACPIandCONFIG_PM_SLEEPso the functions that use it need the same scope.Adjust checks to look for both, and while updating make it
CONFIG_SUSPENDinstead as that's what the acpi header uses.
Quoted 6 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Mario Limonciello <[email protected]>---
v2:
UseCONFIG_SUSPENDinstead ofCONFIG_PM_SLEEP
This seems to be based on the previous fixes merged by Rafael?
Do I need to rebase on -rc2 or something to merge this patch?
Or can Rafael queue this too?
In that case:
Yours,
Linus Walleij
Quoted 19 lines · Linus Walleij
Quoted 8 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
pinctrl_amd_s2idle_dev_opsis hidden under bothCONFIG_ACPIandCONFIG_PM_SLEEPso the functions that use it need the same scope.Adjust checks to look for both, and while updating make it
CONFIG_SUSPENDinstead as that's what the acpi header uses.Quoted 6 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Mario Limonciello <[email protected]>---
v2:
UseCONFIG_SUSPENDinstead ofCONFIG_PM_SLEEPThis seems to be based on the previous fixes merged by Rafael?
Quoted 8 lines
Do I need to rebase on -rc2 or something to merge this patch?
Or can Rafael queue this too?
In that case:Acked-by Linus Walleij <[email protected]>Yours,
Linus Walleij
Yeah; I think Rafael should take it as the other patches are in his tree. No other pinctrl-amd stuff planned this cycle that I know about.
Thanks!
Rafael J. Wysocki
maintainerQuoted 18 lines · Linus Walleij
Quoted 8 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
pinctrl_amd_s2idle_dev_opsis hidden under bothCONFIG_ACPIandCONFIG_PM_SLEEPso the functions that use it need the same scope.Adjust checks to look for both, and while updating make it
CONFIG_SUSPENDinstead as that's what the acpi header uses.Quoted 6 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Mario Limonciello <[email protected]>---
v2:
UseCONFIG_SUSPENDinstead ofCONFIG_PM_SLEEP
Quoted 5 lines
This seems to be based on the previous fixes merged by Rafael?
Do I need to rebase on -rc2 or something to merge this patch?
Or can Rafael queue this too?
I can.
Quoted 2 lines
In that case:
Acked-by Linus Walleij <[email protected]>
Thanks!
Quoted 20 lines · Rafael J. Wysocki
Quoted 18 lines · Linus Walleij
Quoted 14 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
pinctrl_amd_s2idle_dev_opsis hidden under bothCONFIG_ACPIandCONFIG_PM_SLEEPso the functions that use it need the same scope.Adjust checks to look for both, and while updating make it
CONFIG_SUSPENDinstead as that's what the acpi header uses.Reported-by kernel test robot <[email protected]>Signed-off-by Mario Limonciello <[email protected]>---
v2:
UseCONFIG_SUSPENDinstead ofCONFIG_PM_SLEEP
Quoted 10 lines
Quoted 5 lines
This seems to be based on the previous fixes merged by Rafael?
Do I need to rebase on -rc2 or something to merge this patch?
Or can Rafael queue this too?
I can.
Quoted 2 lines
In that case:
Acked-by Linus Walleij <[email protected]>
Applied as 6.16 material, thanks!