diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-06-02 04:43:59 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-06-11 02:07:04 -0400 |
commit | a50de78dc6d21ee074e9561c800d194bec12128b (patch) | |
tree | b6203e3043da1898598db8d441b594a51903f742 /arch/sh/kernel/cpu | |
parent | cf9fe114e3b37e14fc8434d5abb192e35df551b1 (diff) |
sh: clock div4 frequency table offset fix
This patch fixes the per clock offset calculation in
sh_clk_div4_register(). Without this patch the offset
to the frequency table for each clock is incorrect.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r-- | arch/sh/kernel/cpu/clock-cpg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c index 88fc30d2f5fd..e604a6f80194 100644 --- a/arch/sh/kernel/cpu/clock-cpg.c +++ b/arch/sh/kernel/cpu/clock-cpg.c | |||
@@ -71,8 +71,9 @@ int __init sh_clk_div4_register(struct clk *clks, int nr, | |||
71 | int ret = 0; | 71 | int ret = 0; |
72 | int k; | 72 | int k; |
73 | 73 | ||
74 | k = nr_divs + 1; | 74 | freq_table_size *= (nr_divs + 1); |
75 | freq_table = alloc_bootmem(freq_table_size * nr * (nr_divs + 1)); | 75 | |
76 | freq_table = alloc_bootmem(freq_table_size * nr); | ||
76 | if (!freq_table) | 77 | if (!freq_table) |
77 | return -ENOMEM; | 78 | return -ENOMEM; |
78 | 79 | ||