[CPUFREQ] Check whether driver init did not initialize current freq
Check whether driver init did not initialize current freq Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
9d2725bb81
commit
a85f7bd310
1 changed files with 7 additions and 2 deletions
|
@ -1442,8 +1442,13 @@ int cpufreq_update_policy(unsigned int cpu)
|
||||||
-> ask driver for current freq and notify governors about a change */
|
-> ask driver for current freq and notify governors about a change */
|
||||||
if (cpufreq_driver->get) {
|
if (cpufreq_driver->get) {
|
||||||
policy.cur = cpufreq_driver->get(cpu);
|
policy.cur = cpufreq_driver->get(cpu);
|
||||||
if (data->cur != policy.cur)
|
if (!data->cur) {
|
||||||
cpufreq_out_of_sync(cpu, data->cur, policy.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);
|
ret = __cpufreq_set_policy(data, &policy);
|
||||||
|
|
Loading…
Add table
Reference in a new issue