diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2019-03-05 13:55:35 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-03-07 11:23:17 +0100 |
commit | 0996584b3026bed7f38abe02e8535e6a6c474118 (patch) | |
tree | 9fe33cd0609fab1a83532fd1e6c559b79d4fea8d /drivers/base/power/runtime.c | |
parent | fdc56c073270af2f4d223c96a5fff3048352fc03 (diff) | |
download | linux-0996584b3026bed7f38abe02e8535e6a6c474118.tar.gz linux-0996584b3026bed7f38abe02e8535e6a6c474118.tar.bz2 linux-0996584b3026bed7f38abe02e8535e6a6c474118.zip |
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>
Diffstat (limited to 'drivers/base/power/runtime.c')
-rw-r--r-- | drivers/base/power/runtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 32f6bf076bd7..a2d22e3ecf3a 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -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; |