aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2016-05-31 11:25:09 +0100
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-06-22 13:53:00 +0900
commit8d39fc085d268a56486066a3deca94745f804f2d (patch)
tree3f427f2a961e91c8ada3b93a97af1b380415fa7f /drivers/devfreq
parentPM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check (diff)
downloadwireguard-linux-8d39fc085d268a56486066a3deca94745f804f2d.tar.xz
wireguard-linux-8d39fc085d268a56486066a3deca94745f804f2d.zip
PM / devfreq: fix initialization of current frequency in last status
Some systems need current frequency from last_status for calculation but it is zeroed during initialization. When the device starts there is no history, but we can assume that the last frequency was the same as the initial frequency (which is also used in 'previous_freq'). The log shows the result of this misinterpreted value. [ 2.042847] ... Failed to get voltage for frequency 0: -34 Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Javi Merino <javi.merino@arm.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 0ebd64dfc0a9..c7f47e34807b 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -552,6 +552,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq->profile = profile;
strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
devfreq->previous_freq = profile->initial_freq;
+ devfreq->last_status.current_frequency = profile->initial_freq;
devfreq->data = data;
devfreq->nb.notifier_call = devfreq_notifier_call;