Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Magnus Damm and committed by
Paul Mundt
a50de78d cf9fe114

+3 -2
+3 -2
arch/sh/kernel/cpu/clock-cpg.c
··· 71 71 int ret = 0; 72 72 int k; 73 73 74 - k = nr_divs + 1; 75 - freq_table = alloc_bootmem(freq_table_size * nr * (nr_divs + 1)); 74 + freq_table_size *= (nr_divs + 1); 75 + 76 + freq_table = alloc_bootmem(freq_table_size * nr); 76 77 if (!freq_table) 77 78 return -ENOMEM; 78 79