linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rjw@sisk.pl (Rafael J. Wysocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled
Date: Sat, 22 Sep 2012 21:42:50 +0200	[thread overview]
Message-ID: <201209222142.51183.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1209221131320.7497-100000@netrider.rowland.org>

On Saturday, September 22, 2012, Alan Stern wrote:
> On Sat, 22 Sep 2012, Rafael J. Wysocki wrote:
> 
> > On Saturday, September 22, 2012, Kevin Hilman wrote:
> 
> > OK, this looks good to me, thanks!
> > 
> > Alan, what do you think?
> > 
> > Rafael
> 
> > > --- a/drivers/base/power/runtime.c
> > > +++ b/drivers/base/power/runtime.c
> > > @@ -509,6 +509,9 @@ static int rpm_resume(struct device *dev, int rpmflags)
> > >   repeat:
> > >  	if (dev->power.runtime_error)
> > >  		retval = -EINVAL;
> > > +	else if (dev->power.disable_depth == 1 && dev->power.is_suspended
> > > +		 && dev->power.runtime_status == RPM_ACTIVE)
> > > +		retval = 1;
> > >  	else if (dev->power.disable_depth > 0)
> > >  		retval = -EACCES;
> > >  	if (retval)
> 
> Well, I'd prefer the indentation on the continuation line to be 
> different from the indentation of the following line, and I'd prefer 
> to have a comment explaining the reason for the exception.
> 
> But these are only matters of taste; the implementation itself looks 
> good.

Thanks!

I've applied the patch as v3.7 material (and fixed up the white space).

Rafael

      reply	other threads:[~2012-09-22 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 22:47 [PATCH v2] PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled Kevin Hilman
2012-09-22 11:25 ` Rafael J. Wysocki
2012-09-22 15:33   ` Alan Stern
2012-09-22 19:42     ` Rafael J. Wysocki [this message]

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=201209222142.51183.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).