From 2239aa3d15056e4be807eaa8d778b247156ce552 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 20 Nov 2013 14:06:22 -0700 Subject: cpufreq: tegra: don't error target() when suspended d4019f0a92ab "cpufreq: move freq change notifications to cpufreq core" added code to the cpufreq core to print an error if a cpufreq driver's .target() function returned an error. This exposed the fact that Tegra's cpufreq driver returns an error when it is ignoring requests due to the system being suspended. Modify Tegra's .target() function not to return an error in this case; this prevents the error prints. The argument is that since the suspend hook can't and doesn't inform the cpufreq core when its requests will be ignored, there's no way for the cpufreq core to squelch them, so it's not an error for the requests to keep coming. This change make the Tegra driver consistent with how the Exynos handles the same situation. Note that s5pv210-cpufreq.c probably suffers from this same issue though. Fixes: d4019f0a92ab (cpufreq: move freq change notifications to cpufreq core) Signed-off-by: Stephen Warren Signed-off-by: Rafael J. Wysocki diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index f42df7e..b7309c3 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c @@ -142,10 +142,8 @@ static int tegra_target(struct cpufreq_policy *policy, unsigned int index) mutex_lock(&tegra_cpu_lock); - if (is_suspended) { - ret = -EBUSY; + if (is_suspended) goto out; - } freq = freq_table[index].frequency; -- cgit v0.10.2 From 3d3c6f54bccf0a621682d17e25cf22895a0c6e5a Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 18 Nov 2013 17:21:26 +0530 Subject: cpufreq: exynos: Remove unwanted EXPORT_SYMBOL The init functions are linked statically (no support for dynamic loading) and have no other users. Hence remove EXPORT_SYMBOL for these functions. Signed-off-by: Sachin Kamat Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki diff --git a/drivers/cpufreq/exynos4210-cpufreq.c b/drivers/cpufreq/exynos4210-cpufreq.c index f2c7506..dfd1643 100644 --- a/drivers/cpufreq/exynos4210-cpufreq.c +++ b/drivers/cpufreq/exynos4210-cpufreq.c @@ -157,4 +157,3 @@ err_moutcore: pr_debug("%s: failed initialization\n", __func__); return -EINVAL; } -EXPORT_SYMBOL(exynos4210_cpufreq_init); diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c b/drivers/cpufreq/exynos4x12-cpufreq.c index 8683304..efad5e6 100644 --- a/drivers/cpufreq/exynos4x12-cpufreq.c +++ b/drivers/cpufreq/exynos4x12-cpufreq.c @@ -211,4 +211,3 @@ err_moutcore: pr_debug("%s: failed initialization\n", __func__); return -EINVAL; } -EXPORT_SYMBOL(exynos4x12_cpufreq_init); diff --git a/drivers/cpufreq/exynos5250-cpufreq.c b/drivers/cpufreq/exynos5250-cpufreq.c index 9fae466..8feda86 100644 --- a/drivers/cpufreq/exynos5250-cpufreq.c +++ b/drivers/cpufreq/exynos5250-cpufreq.c @@ -236,4 +236,3 @@ err_moutcore: pr_err("%s: failed initialization\n", __func__); return -EINVAL; } -EXPORT_SYMBOL(exynos5250_cpufreq_init); -- cgit v0.10.2