PM / devfreq: fix initialization of current frequency in last status
authorLukasz Luba <lukasz.luba@arm.com>
Tue, 31 May 2016 10:25:09 +0000 (11:25 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 Sep 2017 05:33:26 +0000 (14:33 +0900)
commit144143c10290e99f98c821b19546c8a92e9dac86
treee545160ee7d19ebb366a7e3604e956bdcd6507b8
parent5f65688cc87f977916ad765bbb407d9b1559c605
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>
drivers/devfreq/devfreq.c