提交 8d39fc08 编写于 作者: L Lukasz Luba 提交者: MyungJoo Ham

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: NLukasz Luba <lukasz.luba@arm.com>
Reviewed-by: NJavi Merino <javi.merino@arm.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
上级 674789dd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册