summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 27684fb4ff94..aaf7d95d4453 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1506,8 +1506,13 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
int retval = -EINVAL;
unsigned int old_target_freq = target_freq;
- if (cpufreq_disabled())
+ trace_cpu_scale(policy->cpu, policy->cur, POWER_CPU_SCALE_START);
+
+ if (cpufreq_disabled()) {
+ trace_cpu_scale(policy->cpu, target_freq,
+ POWER_CPU_SCALE_DONE);
return -ENODEV;
+ }
/* Make sure that target_freq is within supported range */
if (target_freq > policy->max)
@@ -1524,9 +1529,9 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
return 0;
}
- trace_cpu_scale(policy->cpu, policy->cur, POWER_CPU_SCALE_START);
if (cpufreq_driver->target)
retval = cpufreq_driver->target(policy, target_freq, relation);
+
trace_cpu_scale(policy->cpu, target_freq, POWER_CPU_SCALE_DONE);
return retval;