summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2006-02-01 11:36:04 +0100
committerDave Jones <davej@redhat.com>2006-02-02 22:56:41 +0100
commita85f7bd310dbc9010309bfe70b6b02432a11ef59 (patch)
tree569a7cb38a5f99579a693749508fd01a9e9912c7
parent[CPUFREQ] Check for not initialized freq on cpufreq changes (diff)
downloadlinux-a85f7bd310dbc9010309bfe70b6b02432a11ef59.tar.xz
linux-a85f7bd310dbc9010309bfe70b6b02432a11ef59.zip
[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>
-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);