X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fvideo%2Fgxt4500.c;h=564557792bed6e616d590b8c49a1d28f3719f442;hb=ec270e59a74eee972006a87c8e12514a20588369;hp=e92337bef50d00951bc4a7b9689f0d05b31a62ec;hpb=fe2520094d88018423dfc42b3cd0015f74e8adea;p=~andy%2Flinux diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c index e92337bef50..564557792be 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;