diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 11:56:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 11:56:25 -0300 |
commit | f1f8bbbb2fcd9dc56fc873f194b06b8f82c0a1c0 (patch) | |
tree | 383a2da8bdc59e474a3b5285240b160edc3ef8b6 /linux/drivers | |
parent | efa9721ae9eaafcd1e0c57c5025bdda6c2bbecba (diff) | |
download | mediapointer-dvb-s2-f1f8bbbb2fcd9dc56fc873f194b06b8f82c0a1c0.tar.gz mediapointer-dvb-s2-f1f8bbbb2fcd9dc56fc873f194b06b8f82c0a1c0.tar.bz2 |
em28xx: some small cleanups
From: Mauro Carvalho Chehab <mchehab@infradead.org>
- Remove dead code;
- Fix a few CodingStyle issues;
- Prints frame number, if debug is enabled.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 517299c52..7eb08bca1 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -153,7 +153,7 @@ static inline void buffer_filled(struct em28xx *dev, struct em28xx_dmaqueue *dma_q, struct em28xx_buffer *buf) { - mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT); + mod_timer(&dma_q->timeout, jiffies + BUFFER_TIMEOUT); /* Advice that buffer was filled */ em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); @@ -179,7 +179,7 @@ static void em28xx_copy_video(struct em28xx *dev, if (dev->frame_size != buf->vb.size) { em28xx_errdev("size %i and buf.length %lu are different!\n", - dev->frame_size, buf->vb.size); + dev->frame_size, buf->vb.size); return; } @@ -228,8 +228,6 @@ static void em28xx_copy_video(struct em28xx *dev, else lencopy = dev->bytesperline; - BUG_ON(lencopy <= 0); - if ((char *)startwrite + lencopy > (char *)outp + buf->vb.size) { em28xx_isocdbg("Overflow of %zi bytes past buffer end (2)\n", ((char *)startwrite + lencopy) - @@ -339,10 +337,6 @@ static inline int em28xx_isoc_copy(struct urb *urb) outp = videobuf_to_vmalloc(&buf->vb); -#if 0 /* FIXME: Need to update this when buffer completed. Until then, don't use it */ - dev->isoc_ctl.buf = buf; -#endif - for (i = 0; i < urb->number_of_packets; i++) { int status = urb->iso_frame_desc[i].status; @@ -370,11 +364,8 @@ static inline int em28xx_isoc_copy(struct urb *urb) logic simpler. Impacts of those changes should be evaluated */ if (p[0] == 0x22 && p[1] == 0x5a) { - /* FIXME - are the fields the right way around? */ - em28xx_isocdbg("Video frame, length=%i, %s\n", len, - (p[2] & 1)? "odd" : "even"); - em28xx_isocdbg("Current buffer is: outp = 0x%p," - " len = %i\n", outp, (int)buf->vb.size); + em28xx_isocdbg("Video frame %d, length=%i, %s\n", p[2], + len, (p[2] & 1)? "odd" : "even"); if (p[2] & 1) buf->top_field = 0; @@ -482,19 +473,6 @@ static void em28xx_uninit_isoc(struct em28xx *dev) em28xx_capture_start(dev, 0); } -#if 0 -/* - * Stop video thread - FIXME: Can be easily removed - */ -static void em28xx_stop_thread(struct em28xx_dmaqueue *dma_q) -{ - struct em28xx *dev = container_of(dma_q, struct em28xx, vidq); - - em28xx_isocdbg("em28xx: called em28xx_stop_thread\n"); - em28xx_uninit_isoc(dev); -} -#endif - /* * Allocate URBs and start IRQ */ |