aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-02 16:54:10 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:27 -0500
commitf4167342b572c6122c712e8c6e5391808c1e5503 (patch)
tree8ed3a3421b48ff75899d31593d0ac2d3ac3a42bb /drivers
parent69acdf1e5a9146ec6667f6c4b439acd38c18f5ea (diff)
V4L/DVB (9514): cx18: Fix PLL freq computation for debug display
cx18: Fix PLL freq computation for debug display. The code to compute the PLL freq from register values was storing an intermediate 56 bit result in a 32 bit type, causing a nonsense value to be displayed. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx18/cx18-av-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c
index 5c079e35e611..518bd701d393 100644
--- a/drivers/media/video/cx18/cx18-av-core.c
+++ b/drivers/media/video/cx18/cx18-av-core.c
@@ -273,10 +273,9 @@ void cx18_av_std_setup(struct cx18 *cx)
273 pll_int, pll_frac, pll_post); 273 pll_int, pll_frac, pll_post);
274 274
275 if (pll_post) { 275 if (pll_post) {
276 int fin, fsc; 276 int fin, fsc, pll;
277 int pll = 28636363L * ((((u64)pll_int) << 25) + pll_frac);
278 277
279 pll >>= 25; 278 pll = (28636364L * ((((u64)pll_int) << 25) + pll_frac)) >> 25;
280 pll /= pll_post; 279 pll /= pll_post;
281 CX18_DEBUG_INFO("PLL = %d.%06d MHz\n", 280 CX18_DEBUG_INFO("PLL = %d.%06d MHz\n",
282 pll / 1000000, pll % 1000000); 281 pll / 1000000, pll % 1000000);