From: Benjamin Herrenschmidt Date: Mon, 2 May 2005 06:25:10 +0000 (+1000) Subject: [PATCH] cpufreq annoying warning fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac09f698f1cda91e890fb75f4cb38253d60ff017;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] cpufreq annoying warning fix The cpufreq core patch I sent earlier got only half-applied. I added a flag to let the low level driver disable an annoying warning on suspend/resume that is normal on ppc, but the "resume" part of it wasn't applied. This just adds back that missing bit. The original patch also reworked the resume() function to avoid nesting too many if () statements along the way I did the suspend() one, but I didn't include that in the patch below. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4fc0cb79f18f..8e561313d094 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1003,9 +1003,10 @@ static int cpufreq_resume(struct sys_device * sysdev) if (unlikely(cur_freq != cpu_policy->cur)) { struct cpufreq_freqs freqs; - printk(KERN_WARNING "Warning: CPU frequency is %u, " - "cpufreq assumed %u kHz.\n", - cur_freq, cpu_policy->cur); + if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN)) + printk(KERN_WARNING "Warning: CPU frequency" + "is %u, cpufreq assumed %u kHz.\n", + cur_freq, cpu_policy->cur); freqs.cpu = cpu; freqs.old = cpu_policy->cur;