Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283497
b: refs/heads/master
c: 11e04fd
h: refs/heads/master
i:
  283495: 8f3999d
v: v3
  • Loading branch information
Nishanth Menon authored and Kevin Hilman committed Nov 8, 2011
1 parent 4bd1a18 commit 90e471d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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: ffe4f0f115420e3843aa0d8dc1baf31ea5b6fcf2
refs/heads/master: 11e04fdd98f0fd6edf1ad6eccb0db4d2f965c392
14 changes: 11 additions & 3 deletions trunk/drivers/cpufreq/omap-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,25 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
if (IS_ERR(mpu_clk))
return PTR_ERR(mpu_clk);

if (policy->cpu >= NR_CPUS)
return -EINVAL;
if (policy->cpu >= NR_CPUS) {
result = -EINVAL;
goto fail_ck;
}

policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
result = opp_init_cpufreq_table(mpu_dev, &freq_table);

if (result) {
dev_err(mpu_dev, "%s: cpu%d: failed creating freq table[%d]\n",
__func__, policy->cpu, result);
return result;
goto fail_ck;
}

result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
if (!result)
cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
else
goto fail_ck;

policy->min = policy->cpuinfo.min_freq;
policy->max = policy->cpuinfo.max_freq;
Expand All @@ -194,6 +198,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = 300 * 1000;

return 0;

fail_ck:
clk_put(mpu_clk);
return result;
}

static int omap_cpu_exit(struct cpufreq_policy *policy)
Expand Down

0 comments on commit 90e471d

Please sign in to comment.