[PATCH v4 05/15] gpio: pxa: Use modern PM macros
Andy Shevchenko
andriy.shevchenko at intel.com
Wed Nov 19 09:41:44 PST 2025
On Thu, Nov 20, 2025 at 12:33:17AM +0800, Jisheng Zhang wrote:
> Use the modern PM macros for the suspend and resume functions to be
> automatically dropped by the compiler when CONFIG_PM or
> CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.
>
> This has the advantage of always compiling these functions in,
> independently of any Kconfig option. Thanks to that, bugs and other
> regressions are subsequently easier to catch.
...
> static struct syscore_ops pxa_gpio_syscore_ops = {
> - .suspend = pxa_gpio_suspend,
> - .resume = pxa_gpio_resume,
> + .suspend = pm_ptr(pxa_gpio_suspend),
> + .resume = pm_ptr(pxa_gpio_resume),
> };
I believe this needs to be thoroughly checked and thought through as
this is *not* a dev_pm_ops.
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list