public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: clock div4 frequency table offset fix
@ 2009-06-02  8:43 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2009-06-02  8:43 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@igel.co.jp>

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>
---

 arch/sh/kernel/cpu/clock-cpg.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- 0001/arch/sh/kernel/cpu/clock-cpg.c
+++ work/arch/sh/kernel/cpu/clock-cpg.c	2009-06-02 16:25:29.000000000 +0900
@@ -71,8 +71,9 @@ int __init sh_clk_div4_register(struct c
 	int ret = 0;
 	int k;
 
-	k = nr_divs + 1;
-	freq_table = alloc_bootmem(freq_table_size * nr * (nr_divs + 1));
+	freq_table_size *= (nr_divs + 1);
+
+	freq_table = alloc_bootmem(freq_table_size * nr);
 	if (!freq_table)
 		return -ENOMEM;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-02  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02  8:43 [PATCH] sh: clock div4 frequency table offset fix Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox