From: Viresh Kumar Date: Tue, 6 Jan 2015 15:39:14 +0000 (+0530) Subject: cpufreq: stats: don't update stats on false notifiers X-Git-Tag: fixes-v4.0-rc1~160^2~1^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e73476949c6d1e2edd04bbf7b5bae30afa370e33;p=pandora-kernel.git cpufreq: stats: don't update stats on false notifiers We need to call cpufreq_stats_update() to update 'time_in_state' for the last frequency. This is achieved by calling it from cpufreq_stat_notifier_trans(), which is called after frequency transition. But if we detect that the cpu's frequency haven't really changed and its a false POSTCHANGE notification, we don't really need to update time_in_state. It wouldn't cause any harm in calling cpufreq_stats_update() but we can avoid calling it here and call it when the frequency really changes. The result will be the same but more efficient. Reviewed-by: Prarit Bhargava Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed