[PATCH v2 09/10] pinctrl: renesas: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper

Andy Shevchenko andy.shevchenko at gmail.com
Mon Jul 17 12:38:07 PDT 2023


On Mon, Jul 17, 2023 at 10:12 PM Paul Cercueil <paul at crapouillou.net> wrote:
> Le lundi 17 juillet 2023 à 20:28 +0300, Andy Shevchenko a écrit :

...

> I think you could do:
>
> .pm = IF_PTR(IS_ENABLED(CONFIG_ARM_PSCI_FW), pm_sleep_ptr(&sh_pfc_pm)),
>
> Then you wouldn't need the #if defined(CONFIG_ARM_PSCI_FW) guard either
> (as long as the code still compiles fine when that config option is
> disabled), and you wouldn't need those dummy callbacks.

Thanks for the hint, but it's ugly looking code.
If we go this direction, we would need local arm_psci_fw_ptr() macro or so.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list