From: Vinod Koul <vinod.koul@intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM: Add helper to mark last busy and autosuspend
Date: Tue, 16 Sep 2014 20:44:57 +0530 [thread overview]
Message-ID: <20140916151457.GQ3131@intel.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1409161024580.1166-100000@iolanthe.rowland.org>
On Tue, Sep 16, 2014 at 10:27:53AM -0400, Alan Stern wrote:
> On Tue, 16 Sep 2014, Subhransu S. Prusty wrote:
>
> > pm_runtime_mark_last_busy and pm_runtime_put_autosuspend are used together
> > in quite a lot of places. Add a helper for these.
> >
> > Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> > ---
> > include/linux/pm_runtime.h | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
> > index 367f49b..256ec50 100644
> > --- a/include/linux/pm_runtime.h
> > +++ b/include/linux/pm_runtime.h
> > @@ -277,4 +277,10 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev)
> > __pm_runtime_use_autosuspend(dev, false);
> > }
> >
> > +static inline int pm_runtime_last_busy_and_autosuspend(struct device *dev)
> > +{
> > + pm_runtime_mark_last_busy(dev);
> > + return pm_runtime_put_autosuspend(dev);
> > +}
> > +
> > #endif
>
> What's the advantage? Removing a few bytes of source code? There will
> no change to the object code. (Not to mention that your patch didn't
> actually change _any_ of the places where both routines get called!)
Yes we didnt change users, as we need this for one of our drivers we are
trying to push.
> Besides, if you're going to make an addition to the runtime PM API like
> this, then you also have to update Documentation/power/runtime_pm.txt.
Sure if you folks are okay we can send update with Documentaion patch too
--
~Vinod
next prev parent reply other threads:[~2014-09-16 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 10:43 [PATCH] PM: Add helper to mark last busy and autosuspend Subhransu S. Prusty
2014-09-16 14:27 ` Alan Stern
2014-09-16 15:14 ` Vinod Koul [this message]
2014-09-16 15:58 ` Alan Stern
2014-09-16 15:36 ` Vinod Koul
2014-09-16 17:22 ` Alan Stern
2014-09-16 17:31 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140916151457.GQ3131@intel.com \
--to=vinod.koul@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=stern@rowland.harvard.edu \
--cc=subhransu.s.prusty@intel.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox