Message ID | 20220104214214.198843-6-paul@crapouillou.net (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | DEV_PM_OPS macros rework | expand |
On Tue, 4 Jan 2022 21:42:11 +0000 Paul Cercueil <paul@crapouillou.net> wrote: > Similar to EXPORT[_GPL]_SIMPLE_DEV_PM_OPS, but for users with runtime-PM > suspend/resume callbacks. > > Signed-off-by: Paul Cercueil <paul@crapouillou.net> Follow up earlier comment. I think you want pm_ptr() around all the entries for RUNTIME_PM_OPS Jonathan > --- > include/linux/pm_runtime.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h > index 4af454d29281..a7f862a26c03 100644 > --- a/include/linux/pm_runtime.h > +++ b/include/linux/pm_runtime.h > @@ -36,6 +36,13 @@ > pm_runtime_force_resume, suspend_fn, \ > resume_fn, idle_fn) > > +#define EXPORT_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ > + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ > + suspend_fn, resume_fn, idle_fn, "") > +#define EXPORT_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ > + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ > + suspend_fn, resume_fn, idle_fn, "_gpl") > + > #ifdef CONFIG_PM > extern struct workqueue_struct *pm_wq; >
On Wed, 5 Jan 2022 10:07:23 +0000 Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote: > On Tue, 4 Jan 2022 21:42:11 +0000 > Paul Cercueil <paul@crapouillou.net> wrote: > > > Similar to EXPORT[_GPL]_SIMPLE_DEV_PM_OPS, but for users with runtime-PM > > suspend/resume callbacks. > > > > Signed-off-by: Paul Cercueil <paul@crapouillou.net> > Follow up earlier comment. I think you want pm_ptr() around all the > entries for RUNTIME_PM_OPS > That issue didn't exist... Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Jonathan > > > --- > > include/linux/pm_runtime.h | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h > > index 4af454d29281..a7f862a26c03 100644 > > --- a/include/linux/pm_runtime.h > > +++ b/include/linux/pm_runtime.h > > @@ -36,6 +36,13 @@ > > pm_runtime_force_resume, suspend_fn, \ > > resume_fn, idle_fn) > > > > +#define EXPORT_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ > > + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ > > + suspend_fn, resume_fn, idle_fn, "") > > +#define EXPORT_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ > > + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ > > + suspend_fn, resume_fn, idle_fn, "_gpl") > > + > > #ifdef CONFIG_PM > > extern struct workqueue_struct *pm_wq; > > >
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 4af454d29281..a7f862a26c03 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -36,6 +36,13 @@ pm_runtime_force_resume, suspend_fn, \ resume_fn, idle_fn) +#define EXPORT_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ + suspend_fn, resume_fn, idle_fn, "") +#define EXPORT_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ + _EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \ + suspend_fn, resume_fn, idle_fn, "_gpl") + #ifdef CONFIG_PM extern struct workqueue_struct *pm_wq;
Similar to EXPORT[_GPL]_SIMPLE_DEV_PM_OPS, but for users with runtime-PM suspend/resume callbacks. Signed-off-by: Paul Cercueil <paul@crapouillou.net> --- include/linux/pm_runtime.h | 7 +++++++ 1 file changed, 7 insertions(+)