summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2006-02-01 13:36:04 +0300
committerDave Jones <davej@redhat.com>2006-02-03 00:56:41 +0300
commita85f7bd310dbc9010309bfe70b6b02432a11ef59 (patch)
tree569a7cb38a5f99579a693749508fd01a9e9912c7 /drivers/cpufreq
parent9d2725bb815d915fc6c8531097d9e71b579a8763 (diff)
downloadlinux-a85f7bd310dbc9010309bfe70b6b02432a11ef59.tar.xz
[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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6bbe5825765a..35eafbcf5ad5 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -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);