Re: [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 30, 2022 at 8:43 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> On Thu, Dec 29, 2022 at 1:59 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > There are a few drivers and might be more in the future that
> > open code the functionality of proposed DEFINE_NOIRQ_DEV_PM_OPS()
> > helper. From now on they may switch to the new helper and save
> > a few lines of code.

...

> > +#define DEFINE_NOIRQ_DEV_PM_OPS(name, suspend_fn, resume_fn) \
> > +const struct dev_pm_ops name = { \
> > +       NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
> > +}
>
> There is NOIRQ_SYSTEM_SLEEP_PM_OPS(), so why is the above needed in addition?

It defines the constant object of struct dev_pm_ops type with this
included and as the commit message says, allows to save a few lines of
code in each of the drivers that uses NOIRQ_SYSTEM_SLEEP_PM_OPS()
currently. The examples on how to convert are provided in the patches
2 and 3.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux