diff options
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 75d618415f4f..64f20fd4631f 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -359,32 +359,6 @@ void saa7134_buffer_timeout(unsigned long data) | |||
359 | spin_unlock_irqrestore(&dev->slock,flags); | 359 | spin_unlock_irqrestore(&dev->slock,flags); |
360 | } | 360 | } |
361 | 361 | ||
362 | /* resends a current buffer in queue after resume */ | ||
363 | |||
364 | static int saa7134_buffer_requeue(struct saa7134_dev *dev, | ||
365 | struct saa7134_dmaqueue *q) | ||
366 | { | ||
367 | struct saa7134_buf *buf, *next; | ||
368 | |||
369 | assert_spin_locked(&dev->slock); | ||
370 | |||
371 | buf = q->curr; | ||
372 | next = buf; | ||
373 | dprintk("buffer_requeue\n"); | ||
374 | |||
375 | if (!buf) | ||
376 | return 0; | ||
377 | |||
378 | dprintk("buffer_requeue : resending active buffers \n"); | ||
379 | |||
380 | if (!list_empty(&q->queue)) | ||
381 | next = list_entry(q->queue.next, struct saa7134_buf, | ||
382 | vb.queue); | ||
383 | buf->activate(dev, buf, next); | ||
384 | |||
385 | return 0; | ||
386 | } | ||
387 | |||
388 | /* ------------------------------------------------------------------ */ | 362 | /* ------------------------------------------------------------------ */ |
389 | 363 | ||
390 | int saa7134_set_dmabits(struct saa7134_dev *dev) | 364 | int saa7134_set_dmabits(struct saa7134_dev *dev) |
@@ -1139,6 +1113,32 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev) | |||
1139 | } | 1113 | } |
1140 | 1114 | ||
1141 | #ifdef CONFIG_PM | 1115 | #ifdef CONFIG_PM |
1116 | |||
1117 | /* resends a current buffer in queue after resume */ | ||
1118 | static int saa7134_buffer_requeue(struct saa7134_dev *dev, | ||
1119 | struct saa7134_dmaqueue *q) | ||
1120 | { | ||
1121 | struct saa7134_buf *buf, *next; | ||
1122 | |||
1123 | assert_spin_locked(&dev->slock); | ||
1124 | |||
1125 | buf = q->curr; | ||
1126 | next = buf; | ||
1127 | dprintk("buffer_requeue\n"); | ||
1128 | |||
1129 | if (!buf) | ||
1130 | return 0; | ||
1131 | |||
1132 | dprintk("buffer_requeue : resending active buffers \n"); | ||
1133 | |||
1134 | if (!list_empty(&q->queue)) | ||
1135 | next = list_entry(q->queue.next, struct saa7134_buf, | ||
1136 | vb.queue); | ||
1137 | buf->activate(dev, buf, next); | ||
1138 | |||
1139 | return 0; | ||
1140 | } | ||
1141 | |||
1142 | static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state) | 1142 | static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state) |
1143 | { | 1143 | { |
1144 | 1144 | ||