Skip to contentSkip to conversation

s3c6410: Fix divider value calculation in s3c64xx_roundrate_clksrc

PATCH New thomas.ab at samsung.com 2 participants 2 messages Sep 8, 2009 – Sep 15, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 s3c6410: Fix divider value calculation in s3c64xx_roundrate_clksrc

From: Thomas Abraham <[email protected]>

In s3c64xx_roundrate_clksrc function, the calculation is wrong. This patch fixes this calculation.

---
 arch/arm/plat-s3c64xx/s3c6400-clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c64xx/s3c6400-clock.c +1 -1
index 54eef93..9745852 100644
@@ -345,7 +345,7 @@ static unsigned long s3c64xx_roundrate_clksrc(struct clk *clk,
 	if (rate > parent_rate)
 		rate = parent_rate;
 	else {
-		div = rate / parent_rate;
+		div = parent_rate / rate;
 
 		if (div == 0)
 			div = 1;
Signature · 1 line
1.5.3.4
Applied
#1 lore raw

PATCH 3/4 s3c6410: Fix divider value calculation in s3c64xx_roundrate_clksrc

Quoted 4 lines · On Tue, Sep 08, 2009 at 02:35:29PM +0900, [email protected] wrote:

From: Thomas Abraham <[email protected]>

In s3c64xx_roundrate_clksrc function, the calculation is wrong. This patch fixes this calculation.

Applied to next-s3c64xx-fixes.

Quoted 26 lines
---
 arch/arm/plat-s3c64xx/s3c6400-clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c64xx/s3c6400-clock.c +1 -1
index 54eef93..9745852 100644
@@ -345,7 +345,7 @@ static unsigned long s3c64xx_roundrate_clksrc(struct clk *clk,
 	if (rate > parent_rate)
 		rate = parent_rate;
 	else {
-		div = rate / parent_rate;
+		div = parent_rate / rate;
 
 		if (div == 0)
 			div = 1;
Signature · 7 lines
1.5.3.4


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 5 lines
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.