aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2012-05-14 17:40:07 +0100
committerDave Martin <dave.martin@linaro.org>2012-05-16 14:51:11 +0100
commit9e1fc62b7feff3a11085882655f05da838a454e2 (patch)
treef813ab34d77dc45f2923f9c4d752116e3e784e51
parentfb85fc1f5c8953dacebf1e21cef164ef7ad57071 (diff)
cpufreq/arm-bl-cpufreq: Avoid redundant switching printks
Previously, switch_to_entry() would print a "switching to cluster n" message to the kernel log even if the system is already on cluster n. This patch makes that printk conditional, so that printk only happens if the call to the hypervisor (and the switch) acctually occurs. Signed-off-by: Dave Martin <dave.martin@linaro.org>
-rw-r--r--drivers/cpufreq/arm-bl-cpufreq_driver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/arm-bl-cpufreq_driver.c b/drivers/cpufreq/arm-bl-cpufreq_driver.c
index 97b7e4f477c..317fe086ba4 100644
--- a/drivers/cpufreq/arm-bl-cpufreq_driver.c
+++ b/drivers/cpufreq/arm-bl-cpufreq_driver.c
@@ -115,12 +115,11 @@ static void switch_to_entry(struct cpufreq_frequency_table const *target)
unsigned long irqflags;
struct timespec ts;
- pr_info("Switching to cluster %d\n", entry_to_cluster(target));
-
spin_lock(&switcher_lock);
old_cluster = get_current_cluster();
if(entry_to_cluster(target) != old_cluster) {
+ pr_info("Switching to cluster %d\n", entry_to_cluster(target));
freqs.old = cluster_to_freq(old_cluster);
freqs.new = entry_to_freq(target);