Skip to content

Commit

Permalink
cpufreq: tegra: don't error target() when suspended
Browse files Browse the repository at this point in the history
d4019f0 "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: d4019f0 (cpufreq: move freq change notifications to cpufreq core)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Stephen Warren authored and Rafael J. Wysocki committed Nov 20, 2013
1 parent aae467c commit 2239aa3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/cpufreq/tegra-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2239aa3

Please sign in to comment.