PM-runtime: Call pm_runtime_active|suspended_time() from sysfs
Avoid the open-coding of the accounted time acquisition in runtime_active|suspend_time_show() and make them call pm_runtime_active|suspended_time() instead. Note that this change also indirectly avoids holding dev->power.lock around the do_div() computation and the sprintf() call which is an additional improvement. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
fdc56c0732
commit
0996584b30
@@ -64,7 +64,7 @@ static int rpm_suspend(struct device *dev, int rpmflags);
|
||||
* runtime_status field is updated, to account the time in the old state
|
||||
* correctly.
|
||||
*/
|
||||
void update_pm_runtime_accounting(struct device *dev)
|
||||
static void update_pm_runtime_accounting(struct device *dev)
|
||||
{
|
||||
u64 now, last, delta;
|
||||
|
||||
|
Reference in New Issue
Block a user