Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376773
b: refs/heads/master
c: 0ca6843
h: refs/heads/master
i:
  376771: 04501d7
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Rafael J. Wysocki committed Jun 5, 2013
1 parent 04e83f2 commit ce82a0f
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 2f7021a815f20f3481c10884fe9735ce2a56db35
refs/heads/master: 0ca684365547cd5f214b5739568dae3df5d6cec9
5 changes: 3 additions & 2 deletions trunk/drivers/cpufreq/cpufreq-cpu0.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
struct cpufreq_freqs freqs;
struct opp *opp;
unsigned long volt = 0, volt_old = 0, tol = 0;
long freq_Hz;
long freq_Hz, freq_exact;
unsigned int index;
int ret;

Expand All @@ -60,6 +60,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
freq_Hz = clk_round_rate(cpu_clk, freq_table[index].frequency * 1000);
if (freq_Hz < 0)
freq_Hz = freq_table[index].frequency * 1000;
freq_exact = freq_Hz;
freqs.new = freq_Hz / 1000;
freqs.old = clk_get_rate(cpu_clk) / 1000;

Expand Down Expand Up @@ -98,7 +99,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
}
}

ret = clk_set_rate(cpu_clk, freqs.new * 1000);
ret = clk_set_rate(cpu_clk, freq_exact);
if (ret) {
pr_err("failed to set clock rate: %d\n", ret);
if (cpu_reg)
Expand Down

0 comments on commit ce82a0f

Please sign in to comment.