Skip to content

Commit

Permalink
[CPUFREQ] Check whether driver init did not initialize current freq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Renninger authored and Dave Jones committed Feb 2, 2006
1 parent 9d2725b commit a85f7bd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a85f7bd

Please sign in to comment.