]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/cpufreq/cpufreq.c
[CPUFREQ] Check whether driver init did not initialize current freq
[linux-2.6-omap-h63xx.git] / 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);