X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fgxt4500.c;h=564557792bed6e616d590b8c49a1d28f3719f442;hb=a1716d508abf77e4bd02c275ab9293b9866929f3;hp=e92337bef50d00951bc4a7b9689f0d05b31a62ec;hpb=9cf52b2921fbe62566b6b2ee79f71203749c9e5e;p=linux-2.6 diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c index e92337bef5..564557792b 100644 --- a/drivers/video/gxt4500.c +++ b/drivers/video/gxt4500.c @@ -238,7 +238,7 @@ static int calc_pll(int period_ps, struct gxt4500_par *par) for (pdiv1 = 1; pdiv1 <= 8; ++pdiv1) { for (pdiv2 = 1; pdiv2 <= pdiv1; ++pdiv2) { postdiv = pdiv1 * pdiv2; - pll_period = (period_ps + postdiv - 1) / postdiv; + pll_period = DIV_ROUND_UP(period_ps, postdiv); /* keep pll in range 350..600 MHz */ if (pll_period < 1666 || pll_period > 2857) continue;