pinctrl: at91: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 17 Jul 2023 17:28:17 +0000 (20:28 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 21 Aug 2023 15:58:10 +0000 (18:58 +0300)
commitf0d8d0eea5ed9854b4e4a8973ddced1a8e660a77
treee5a19863cd77fc7e7525296e05393b7e7823b264
parente5f32bf0974f817790717839e4a53b16eedcb5a9
pinctrl: at91: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper

Since pm.h provides a helper for system no-IRQ PM callbacks,
switch the driver to use it instead of open coded variant.

With that switch pm_ptr() to pm_sleep_ptr() as the above
mentioned callbacks are only used for system sleep.

The use of the pm_sleep_ptr() macro allows the compiler
to always see the dev_pm_ops structure and related functions,
while still allowing the unused code to be removed, without
the need for the __maybe_unused markings.

Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230717172821.62827-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/pinctrl/pinctrl-at91.c