Re: [PATCH v2] iio: cros_ec: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio,dev.linux.lists.chrome-platform,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
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