Skip to content

Commit

Permalink
PM / Runtime: Make documentation of runtime_idle() agree with the code
Browse files Browse the repository at this point in the history
Currently the ->runtime_idle() callback is documented as having no
return value, but in fact it returns int.  Although its return value
is ignored at the PM core level, it may be used by bus type routines
executing the drivers' ->runtime_idle() callbacks.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
  • Loading branch information
Rafael J. Wysocki committed Dec 6, 2009
1 parent 0ddf0ed commit e1b1903
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Documentation/power/runtime_pm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct dev_pm_ops {
...
int (*runtime_suspend)(struct device *dev);
int (*runtime_resume)(struct device *dev);
void (*runtime_idle)(struct device *dev);
int (*runtime_idle)(struct device *dev);
...
};

Expand Down Expand Up @@ -114,7 +114,8 @@ The action performed by a bus type's ->runtime_idle() callback is totally
dependent on the bus type in question, but the expected and recommended action
is to check if the device can be suspended (i.e. if all of the conditions
necessary for suspending the device are satisfied) and to queue up a suspend
request for the device in that case.
request for the device in that case. The value returned by this callback is
ignored by the PM core.

The helper functions provided by the PM core, described in Section 4, guarantee
that the following constraints are met with respect to the bus type's run-time
Expand Down

0 comments on commit e1b1903

Please sign in to comment.