Re: [PATCH v2] PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled

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

 



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.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux