Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336712
b: refs/heads/master
c: 7249924
h: refs/heads/master
v: v3
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent f5b9e7f commit 188a54e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a1c022850ea5d64c2997bf9b89f5ae112d5ee4d
refs/heads/master: 7249924e537816368c4a35afd97ab311f75a6368
11 changes: 9 additions & 2 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1470,12 +1470,19 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
unsigned int relation)
{
int retval = -EINVAL;
unsigned int old_target_freq = target_freq;

if (cpufreq_disabled())
return -ENODEV;

pr_debug("target for CPU %u: %u kHz, relation %u\n", policy->cpu,
target_freq, relation);
/* Make sure that target_freq is within supported range */
if (target_freq > policy->max)
target_freq = policy->max;
if (target_freq < policy->min)
target_freq = policy->min;

pr_debug("target for CPU %u: %u kHz, relation %u, requested %u kHz\n",
policy->cpu, target_freq, relation, old_target_freq);

if (target_freq == policy->cur)
return 0;
Expand Down

0 comments on commit 188a54e

Please sign in to comment.