diff options
author | Thomas Renninger <trenn@suse.de> | 2006-02-01 10:36:04 (GMT) |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-02-02 21:56:41 (GMT) |
commit | a85f7bd310dbc9010309bfe70b6b02432a11ef59 (patch) | |
tree | 569a7cb38a5f99579a693749508fd01a9e9912c7 /drivers/cpufreq | |
parent | 9d2725bb815d915fc6c8531097d9e71b579a8763 (diff) | |
download | linux-fsl-qoriq-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6bbe582..35eafbc 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); |