]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[CPUFREQ] Check whether driver init did not initialize current freq
authorThomas Renninger <trenn@suse.de>
Wed, 1 Feb 2006 10:36:04 +0000 (11:36 +0100)
committerDave Jones <davej@redhat.com>
Thu, 2 Feb 2006 21:56:41 +0000 (16:56 -0500)
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>
drivers/cpufreq/cpufreq.c

index 6bbe5825765a759d5286c30fd75e8eb392620c08..35eafbcf5ad52932e247d41c3bd5f21b9dd0a96f 100644 (file)
@@ -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);