summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/qcom-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/qcom-cpufreq.c')
-rw-r--r--drivers/cpufreq/qcom-cpufreq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpufreq/qcom-cpufreq.c b/drivers/cpufreq/qcom-cpufreq.c
index 009f8d9911be..09f10647982b 100644
--- a/drivers/cpufreq/qcom-cpufreq.c
+++ b/drivers/cpufreq/qcom-cpufreq.c
@@ -71,12 +71,15 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
{
- int ret = -EFAULT;
+ int ret = 0;
int index;
struct cpufreq_frequency_table *table;
mutex_lock(&per_cpu(suspend_data, policy->cpu).suspend_mutex);
+ if (target_freq == policy->cur)
+ goto done;
+
if (per_cpu(suspend_data, policy->cpu).device_suspended) {
pr_debug("cpufreq: cpu%d scheduling frequency change "
"in suspend.\n", policy->cpu);