diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-05-30 13:34:16 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-06-08 07:10:37 -0400 |
commit | 947391cfbaa3b08558844c0b187bcd0223c3f660 (patch) | |
tree | 120191578808f242dd489fb4a329a0dff083bbba /drivers/mtd/nand/s3c2410.c | |
parent | dea2aa6fd7d46c43c840ad77905f3c161d5bc59d (diff) |
[MTD] [NAND] S3C2410: Use DIV_ROUND_UP
Change to using DIV_ROUND_UP() in the timing calculation
instead of blindly doing result++
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/mtd/nand/s3c2410.c')
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 8a7f960a0df5..89b79051cc68 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -180,8 +180,7 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max) | |||
180 | { | 180 | { |
181 | int result; | 181 | int result; |
182 | 182 | ||
183 | result = (wanted * clk) / NS_IN_KHZ; | 183 | result = DIV_ROUND_UP((wanted * clk), NS_IN_KHZ); |
184 | result++; | ||
185 | 184 | ||
186 | pr_debug("result %d from %ld, %d\n", result, clk, wanted); | 185 | pr_debug("result %d from %ld, %d\n", result, clk, wanted); |
187 | 186 | ||