Re: [PATCH v2] iio: cros_ec: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
From: Andy Shevchenko
Date: Tue Aug 25 2026 - 05:18:16 EST
On Tue, Aug 25, 2026 at 08:27:24AM +0700, Triet Hoang wrote:
> Convert deprecated SIMPLE_DEV_PM_OPS to DEFINE_SIMPLE_DEV_PM_OPS
SIMPLE_DEV_PM_OPS()
DEFINE_SIMPLE_DEV_PM_OPS()
> and pm_sleep_ptr().
>
> This lets us drop the __maybe_unused annotations from the resume callbacks,
> and reduces kernel size when CONFIG_PM or CONFIG_PM_SLEEP is disabled.
Not really, the __maybe_unused is done in a way that _object_ size is bigger
(function is compiled), but since it's put in a separate section, linker will
drop it as unused, so the resulting binary will not have it.
...
Code wise looks good to me.
--
With Best Regards,
Andy Shevchenko