From 5e49bc4d9e982bbfdaf7d6cf8bd96e43bd9f7db6 Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Tue, 8 Sep 2009 14:35:29 +0900 Subject: [PATCH] ARM: S3C64XX: Fix divider value calculation in s3c64xx_roundrate_clksrc In s3c64xx_roundrate_clksrc function, the calculation is wrong. This patch fixes this calculation. Signed-off-by: Thomas Abraham Signed-off-by: Ben Dooks --- arch/arm/plat-s3c64xx/s3c6400-clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c index 54eef93..9745852 100644 --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c @@ -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; -- 2.7.4