Re: [PATCH] iio: adc: ad7606: use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()

From: Andy Shevchenko

Date: Thu Oct 15 2026 - 14:45:36 EST


On Thu, Oct 15, 2026 at 06:19:03PM +0300, Abdelnasser Hussein wrote:
> Replace SIMPLE_DEV_PM_OPS() with EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS()
> and use pm_sleep_ptr() to wire up the power management operations.
>
> This allows dropping the #ifdef CONFIG_PM_SLEEP guards, simplifying the
> code and improving compile test coverage of the suspend/resume callbacks
> while still allowing the compiler to optimize them out when
> CONFIG_PM_SLEEP is disabled.

...

> +EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS(ad7606_pm_ops, ad7606_suspend, ad7606_resume,
> + IIO_AD7606);

Just make it a single line. In this case I think it's fine. Otherwise LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko