Skip to content

Commit

Permalink
[MTD] [NAND] S3C2410: Use DIV_ROUND_UP
Browse files Browse the repository at this point in the history
Change to using DIV_ROUND_UP() in the timing calculation
instead of blindly doing result++

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Ben Dooks committed Jun 8, 2009
1 parent dea2aa6 commit 947391c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max)
{
int result;

result = (wanted * clk) / NS_IN_KHZ;
result++;
result = DIV_ROUND_UP((wanted * clk), NS_IN_KHZ);

pr_debug("result %d from %ld, %d\n", result, clk, wanted);

Expand Down

0 comments on commit 947391c

Please sign in to comment.