]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cpufreq: Only call cpufreq_out_of_sync() for driver that implement cpufreq_driver...
authorDirk Brandewie <dirk.brandewie@gmail.com>
Wed, 6 Feb 2013 17:02:09 +0000 (09:02 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 9 Feb 2013 11:55:47 +0000 (12:55 +0100)
Scaling drivers that implement cpufreq_driver.setpolicy() have
internal governors that do not signal changes via
cpufreq_notify_transition() so the frequncy in the policy will almost
certainly be different than the current frequncy.  Only call
cpufreq_out_of_sync() when the underlying driver implements
cpufreq_driver.target()

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c

index e98035dc2265cc483e80265c6a4b7e7596804b9e..480c49c71afec6661ab9ddb7e3729e54f8af8fd7 100644 (file)
@@ -1770,7 +1770,7 @@ int cpufreq_update_policy(unsigned int cpu)
                        pr_debug("Driver did not initialize current freq");
                        data->cur = policy.cur;
                } else {
-                       if (data->cur != policy.cur)
+                       if (data->cur != policy.cur && cpufreq_driver->target)
                                cpufreq_out_of_sync(cpu, data->cur,
                                                                policy.cur);
                }