diff options
author | Thomas Renninger <trenn@suse.de> | 2006-02-01 05:36:04 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-02-02 16:56:41 -0500 |
commit | a85f7bd310dbc9010309bfe70b6b02432a11ef59 (patch) | |
tree | 569a7cb38a5f99579a693749508fd01a9e9912c7 /drivers/cpufreq/cpufreq.c | |
parent | 9d2725bb815d915fc6c8531097d9e71b579a8763 (diff) |
[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/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 9 |
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) | |||
1442 | -> ask driver for current freq and notify governors about a change */ | 1442 | -> ask driver for current freq and notify governors about a change */ |
1443 | if (cpufreq_driver->get) { | 1443 | if (cpufreq_driver->get) { |
1444 | policy.cur = cpufreq_driver->get(cpu); | 1444 | policy.cur = cpufreq_driver->get(cpu); |
1445 | if (data->cur != policy.cur) | 1445 | if (!data->cur) { |
1446 | cpufreq_out_of_sync(cpu, data->cur, policy.cur); | 1446 | dprintk("Driver did not initialize current freq"); |
1447 | data->cur = policy.cur; | ||
1448 | } else { | ||
1449 | if (data->cur != policy.cur) | ||
1450 | cpufreq_out_of_sync(cpu, data->cur, policy.cur); | ||
1451 | } | ||
1447 | } | 1452 | } |
1448 | 1453 | ||
1449 | ret = __cpufreq_set_policy(data, &policy); | 1454 | ret = __cpufreq_set_policy(data, &policy); |