Commit a85f7bd3 authored by Thomas Renninger's avatar Thomas Renninger Committed by Dave Jones

[CPUFREQ] Check whether driver init did not initialize current freq

Check whether driver init did not initialize current freq
Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 9d2725bb
......@@ -1442,8 +1442,13 @@ int cpufreq_update_policy(unsigned int cpu)
-> ask driver for current freq and notify governors about a change */
if (cpufreq_driver->get) {
policy.cur = cpufreq_driver->get(cpu);
if (data->cur != policy.cur)
cpufreq_out_of_sync(cpu, data->cur, policy.cur);
if (!data->cur) {
dprintk("Driver did not initialize current freq");
data->cur = policy.cur;
} else {
if (data->cur != policy.cur)
cpufreq_out_of_sync(cpu, data->cur, policy.cur);
}
}
ret = __cpufreq_set_policy(data, &policy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment