Re: [PATCH] PM: allow for usage_count > 0 in pm_runtime_get()

Alan Stern
2009-12-02T15:15:48Z

On Wed, 2 Dec 2009, Rafael J. Wysocki wrote:

> > BTW, I just noticed that the runtime_idle method is documented as
> > returning void but defined in pm.h as returning int. Obviously the
> > definition is wrong, since no return value is ever used. Would you
> > like to fix it?
>
> In fact it's been changed to return int at the Matthew's request, because
> bus type code might use the return value from a driver's callback. In fact
> the PCI runtime PM framework being worked on at the moment uses
> the return value of a driver's runtime_idle(), if implemented.
>
> So, the documentation has to be changed rather than the definition.

Understood. When you change it, mention that the PM core doesn't use
the return value from bus subsystems, but the bus might want to use the
return value from drivers.

Alan Stern