[PATCH v2] PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled
Rafael J. Wysocki
rjw at sisk.pl
Sat Sep 22 15:42:50 EDT 2012
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
More information about the linux-arm-kernel
mailing list