summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-03-10 10:52:02 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2007-03-10 10:52:02 +0100
commit14f4257e6bc797cf765506a219f8af50a3e1586f (patch)
treee2eee569d3290d8f109069453316dce302d61d73 /linux/drivers/media/video/ivtv/ivtv-driver.c
parent2b48db9d0abc9a080707fc51f452820c10eac666 (diff)
downloadmediapointer-dvb-s2-14f4257e6bc797cf765506a219f8af50a3e1586f.tar.gz
mediapointer-dvb-s2-14f4257e6bc797cf765506a219f8af50a3e1586f.tar.bz2
Merges VBI & YUV handling into a single work queue.
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c
index 1cf820fb0..56639bac5 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c
@@ -628,25 +628,16 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv)
itv->lock = SPIN_LOCK_UNLOCKED;
itv->dma_reg_lock = SPIN_LOCK_UNLOCKED;
- itv->vbi.work_queues = create_workqueue("ivtv_vbi");
- if (itv->vbi.work_queues == NULL) {
- IVTV_ERR("Could not create VBI workqueue\n");
- return -1;
- }
-
- itv->yuv_info.work_queues = create_workqueue("ivtv_yuv");
- if (itv->yuv_info.work_queues == NULL) {
- IVTV_ERR("Could not create YUV workqueue\n");
- destroy_workqueue(itv->vbi.work_queues);
+ itv->irq_work_queues = create_workqueue(itv->name);
+ if (itv->irq_work_queues == NULL) {
+ IVTV_ERR("Could not create ivtv workqueue\n");
return -1;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
- INIT_WORK(&itv->vbi.work_queue, vbi_work_handler);
- INIT_WORK(&itv->yuv_info.work_queue, ivtv_yuv_work_handler);
+ INIT_WORK(&itv->irq_work_queue, ivtv_irq_work_handler);
#else
- INIT_WORK(&itv->vbi.work_queue, vbi_work_handler, itv);
- INIT_WORK(&itv->yuv_info.work_queue, ivtv_yuv_work_handler, itv);
+ INIT_WORK(&itv->irq_work_queue, ivtv_irq_work_handler, itv);
#endif
/* start counting open_id at 1 */
@@ -1246,8 +1237,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
if (itv->has_cx23415)
release_mem_region(itv->base_addr + IVTV_DECODER_OFFSET, IVTV_DECODER_SIZE);
free_workqueue:
- destroy_workqueue(itv->vbi.work_queues);
- destroy_workqueue(itv->yuv_info.work_queues);
+ destroy_workqueue(itv->irq_work_queues);
err:
if (retval == 0)
retval = -ENODEV;
@@ -1289,10 +1279,8 @@ static void ivtv_remove(struct pci_dev *pci_dev)
/* Stop all Work Queues */
IVTV_DEBUG_INFO(" Stop Work Queues.\n");
- flush_workqueue(itv->vbi.work_queues);
- flush_workqueue(itv->yuv_info.work_queues);
- destroy_workqueue(itv->vbi.work_queues);
- destroy_workqueue(itv->yuv_info.work_queues);
+ flush_workqueue(itv->irq_work_queues);
+ destroy_workqueue(itv->irq_work_queues);
IVTV_DEBUG_INFO(" Stopping Firmware.\n");
ivtv_halt_firmware(itv);