diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 14:01:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:08:48 -0400 |
commit | b957dfdc3161d00b01b52154eb2d53580c8911e5 (patch) | |
tree | bc7f545ed8cb20ae990753a3b62abd658df4b843 /drivers/media | |
parent | a9dbbeb7d615761a82fcd4f00ec290a07be7d8a2 (diff) |
V4L/DVB (7555): em28xx: remove timeout
It seems that we don't need a timeout for em28xx.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 31 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 1 |
2 files changed, 0 insertions, 32 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 0aaf4e767e0d..d6ada6226b54 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -63,8 +63,6 @@ MODULE_PARM_DESC(isoc_debug, "enable debug messages [isoc transfers]"); | |||
63 | printk(KERN_INFO "%s %s :"fmt, \ | 63 | printk(KERN_INFO "%s %s :"fmt, \ |
64 | dev->name, __func__ , ##arg); } while (0) | 64 | dev->name, __func__ , ##arg); } while (0) |
65 | 65 | ||
66 | #define BUFFER_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ | ||
67 | |||
68 | /* Limits minimum and default number of buffers */ | 66 | /* Limits minimum and default number of buffers */ |
69 | #define EM28XX_MIN_BUF 4 | 67 | #define EM28XX_MIN_BUF 4 |
70 | #define EM28XX_DEF_BUF 8 | 68 | #define EM28XX_DEF_BUF 8 |
@@ -133,8 +131,6 @@ static inline void buffer_filled(struct em28xx *dev, | |||
133 | struct em28xx_dmaqueue *dma_q, | 131 | struct em28xx_dmaqueue *dma_q, |
134 | struct em28xx_buffer *buf) | 132 | struct em28xx_buffer *buf) |
135 | { | 133 | { |
136 | mod_timer(&dma_q->timeout, jiffies + BUFFER_TIMEOUT); | ||
137 | |||
138 | /* Advice that buffer was filled */ | 134 | /* Advice that buffer was filled */ |
139 | em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); | 135 | em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); |
140 | buf->vb.state = VIDEOBUF_DONE; | 136 | buf->vb.state = VIDEOBUF_DONE; |
@@ -445,7 +441,6 @@ static void em28xx_uninit_isoc(struct em28xx *dev) | |||
445 | 441 | ||
446 | dev->isoc_ctl.num_bufs = 0; | 442 | dev->isoc_ctl.num_bufs = 0; |
447 | 443 | ||
448 | del_timer(&dev->vidq.timeout); | ||
449 | em28xx_capture_start(dev, 0); | 444 | em28xx_capture_start(dev, 0); |
450 | } | 445 | } |
451 | 446 | ||
@@ -560,28 +555,6 @@ static int em28xx_start_thread(struct em28xx_dmaqueue *dma_q) | |||
560 | return 0; | 555 | return 0; |
561 | } | 556 | } |
562 | 557 | ||
563 | static void em28xx_vid_timeout(unsigned long data) | ||
564 | { | ||
565 | struct em28xx *dev = (struct em28xx *)data; | ||
566 | struct em28xx_dmaqueue *vidq = &dev->vidq; | ||
567 | struct em28xx_buffer *buf; | ||
568 | unsigned long flags; | ||
569 | |||
570 | spin_lock_irqsave(&dev->slock, flags); | ||
571 | |||
572 | list_for_each_entry(buf, vidq->active.next, vb.queue) { | ||
573 | list_del(&buf->vb.queue); | ||
574 | buf->vb.state = VIDEOBUF_ERROR; | ||
575 | wake_up(&buf->vb.done); | ||
576 | em28xx_videodbg("em28xx/0: [%p/%d] timeout\n", | ||
577 | buf, buf->vb.i); | ||
578 | } | ||
579 | /* Instead of trying to restart, just sets timeout again */ | ||
580 | mod_timer(&vidq->timeout, jiffies + BUFFER_TIMEOUT); | ||
581 | |||
582 | spin_unlock_irqrestore(&dev->slock, flags); | ||
583 | } | ||
584 | |||
585 | /* ------------------------------------------------------------------ | 558 | /* ------------------------------------------------------------------ |
586 | Videobuf operations | 559 | Videobuf operations |
587 | ------------------------------------------------------------------*/ | 560 | ------------------------------------------------------------------*/ |
@@ -2212,10 +2185,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
2212 | INIT_LIST_HEAD(&dev->vidq.active); | 2185 | INIT_LIST_HEAD(&dev->vidq.active); |
2213 | INIT_LIST_HEAD(&dev->vidq.queued); | 2186 | INIT_LIST_HEAD(&dev->vidq.queued); |
2214 | 2187 | ||
2215 | dev->vidq.timeout.function = em28xx_vid_timeout; | ||
2216 | dev->vidq.timeout.data = (unsigned long)dev; | ||
2217 | init_timer(&dev->vidq.timeout); | ||
2218 | |||
2219 | 2188 | ||
2220 | if (dev->has_msp34xx) { | 2189 | if (dev->has_msp34xx) { |
2221 | /* Send a reset to other chips via gpio */ | 2190 | /* Send a reset to other chips via gpio */ |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index af15fd3f4f81..6d62357a038f 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -138,7 +138,6 @@ struct em28xx_buffer { | |||
138 | struct em28xx_dmaqueue { | 138 | struct em28xx_dmaqueue { |
139 | struct list_head active; | 139 | struct list_head active; |
140 | struct list_head queued; | 140 | struct list_head queued; |
141 | struct timer_list timeout; | ||
142 | 141 | ||
143 | wait_queue_head_t wq; | 142 | wait_queue_head_t wq; |
144 | 143 | ||