summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-02 16:54:10 -0500
committerAndy Walls <awalls@radix.net>2008-11-02 16:54:10 -0500
commita8c7bca3ca525526b4a274562230ff233d698018 (patch)
treece192d4a29d1ada7df97858d7343f58223439f8d /linux/drivers
parent64df1078ed0a76647e88e4f091d29980982e9e8f (diff)
downloadmediapointer-dvb-s2-a8c7bca3ca525526b4a274562230ff233d698018.tar.gz
mediapointer-dvb-s2-a8c7bca3ca525526b4a274562230ff233d698018.tar.bz2
cx18: Fix PLL freq computation for debug display
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/cx18/cx18-av-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-av-core.c b/linux/drivers/media/video/cx18/cx18-av-core.c
index 5c079e35e..518bd701d 100644
--- a/linux/drivers/media/video/cx18/cx18-av-core.c
+++ b/linux/drivers/media/video/cx18/cx18-av-core.c
@@ -273,10 +273,9 @@ void cx18_av_std_setup(struct cx18 *cx)
pll_int, pll_frac, pll_post);
if (pll_post) {
- int fin, fsc;
- int pll = 28636363L * ((((u64)pll_int) << 25) + pll_frac);
+ int fin, fsc, pll;
- pll >>= 25;
+ pll = (28636364L * ((((u64)pll_int) << 25) + pll_frac)) >> 25;
pll /= pll_post;
CX18_DEBUG_INFO("PLL = %d.%06d MHz\n",
pll / 1000000, pll % 1000000);