From: Dirk Brandewie Date: Wed, 6 Feb 2013 17:02:09 +0000 (-0800) Subject: cpufreq: Only call cpufreq_out_of_sync() for driver that implement cpufreq_driver... X-Git-Tag: upstream/snapshot3+hdmi~5650^2~2^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6b0515b078f641d00ca531a9f0ae34f3b05ec20;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git cpufreq: Only call cpufreq_out_of_sync() for driver that implement cpufreq_driver.target() 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 Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index e98035d..480c49c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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); }