summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-06-08 17:25:00 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-08 17:25:00 -0300
commit693882afa6ea23768645020bf27408c0deaff8a9 (patch)
tree093010317845275f52be06a59928a9826632cf82 /linux
parent3f6fb6f3acef43c20b96855b273c9b912af22b87 (diff)
downloadmediapointer-dvb-s2-693882afa6ea23768645020bf27408c0deaff8a9.tar.gz
mediapointer-dvb-s2-693882afa6ea23768645020bf27408c0deaff8a9.tar.bz2
Fixes a warning about using pll without init.
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-vbi.c61
1 files changed, 32 insertions, 29 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-vbi.c b/linux/drivers/media/video/cx25840/cx25840-vbi.c
index 3383b5549..b452ec9c8 100644
--- a/linux/drivers/media/video/cx25840/cx25840-vbi.c
+++ b/linux/drivers/media/video/cx25840/cx25840-vbi.c
@@ -89,25 +89,7 @@ void cx25840_vbi_setup(struct i2c_client *client)
v4l2_std_id std = cx25840_get_v4lstd(client);
int hblank,hactive,burst,vblank,vactive,sc,vblank656,src_decimation;
int luma_lpf,uv_lpf, comb;
- u32 pll,pll_int,pll_frac,pll_post,fin,fsc;
-
- /* DEBUG: Displays configured PLL frequency */
- pll_int=cx25840_read(client, 0x108);
- pll_frac=cx25840_read4(client, 0x10c)&0x1ffffff;
- pll_post=cx25840_read(client, 0x109);
- v4l_dbg(1, cx25840_debug, client,
- "PLL regs = int: %u, frac: %u, post: %u\n",
- pll_int,pll_frac,pll_post);
-
-
- if (pll_post) {
- pll= (28636363L*((((u64)pll_int)<<25L)+pll_frac)) >>25L;
- pll/=pll_post;
- v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n",
- pll/1000000, pll%1000000);
- v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n",
- pll/8000000, (pll/8)%1000000);
- }
+ u32 pll_int,pll_frac,pll_post;
/* datasheet startup, step 8d */
if (std & ~V4L2_STD_NTSC) {
@@ -159,20 +141,41 @@ void cx25840_vbi_setup(struct i2c_client *client)
}
}
- fin=((u64)src_decimation*pll)>>12;
- v4l_dbg(1, cx25840_debug, client, "ADC Sampling freq = %d.%06d MHz\n",
+ /* DEBUG: Displays configured PLL frequency */
+ pll_int=cx25840_read(client, 0x108);
+ pll_frac=cx25840_read4(client, 0x10c)&0x1ffffff;
+ pll_post=cx25840_read(client, 0x109);
+ v4l_dbg(1, cx25840_debug, client,
+ "PLL regs = int: %u, frac: %u, post: %u\n",
+ pll_int,pll_frac,pll_post);
+
+ if (pll_post) {
+ int fin, fsc;
+ int pll= (28636363L*((((u64)pll_int)<<25L)+pll_frac)) >>25L;
+
+ pll/=pll_post;
+ v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n",
+ pll/1000000, pll%1000000);
+ v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n",
+ pll/8000000, (pll/8)%1000000);
+
+ fin=((u64)src_decimation*pll)>>12;
+ v4l_dbg(1, cx25840_debug, client, "ADC Sampling freq = "
+ "%d.%06d MHz\n",
fin/1000000,fin%1000000);
- fsc= (((u64)sc)*pll) >> 24L;
- fsc= ((u32)((((u64)sc)*pll) >> 21L))/src_decimation;
- v4l_dbg(1, cx25840_debug, client, "Chroma sub-carrier freq = %d.%06d MHz\n",
+ fsc= (((u64)sc)*pll) >> 24L;
+ v4l_dbg(1, cx25840_debug, client, "Chroma sub-carrier freq = "
+ "%d.%06d MHz\n",
fsc/1000000,fsc%1000000);
- v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, vblank %i"
- ", vactive %i, vblank656 %i, src_dec %i,"
- "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, sc 0x%06x\n",
- hblank, hactive, vblank, vactive, vblank656, src_decimation,
- burst, luma_lpf, uv_lpf, comb, sc);
+ v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, "
+ "vblank %i , vactive %i, vblank656 %i, src_dec %i,"
+ "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x,"
+ " sc 0x%06x\n",
+ hblank, hactive, vblank, vactive, vblank656,
+ src_decimation, burst, luma_lpf, uv_lpf, comb, sc);
+ }
/* Sets horizontal blanking delay and active lines */
cx25840_write(client, 0x470, hblank);