]> git.baikalelectronics.ru Git - kernel.git/commit
s3c2410fb: fix clockrate calculation
authorBen Dooks <ben@simtec.co.uk>
Tue, 22 Sep 2009 23:47:43 +0000 (16:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:56 +0000 (07:39 -0700)
commit9f957fc3d646cddff2f02d51d47ba33c6f275be3
tree5909f2f112ca2d160cbf5f65ac6776e5f0fd84b5
parent8cf7e9fedd2ea4ac83ab5041b10cd42b7d14cb7f
s3c2410fb: fix clockrate calculation

In the final part of the calculation for the tft display clockrate we
divide the output pf s3c2410fb_calc_pixclk() by 2 which leaves us with a
rounding error if the result is odd.

Change to using DIV_ROUND_UP() to ensure that we always choose a higher
divisor and thus a lower frequency.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/s3c2410fb.c