The patch number 9777 was added via Andy Walls <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]
------
From: Andy Walls <[EMAIL PROTECTED]>
cx18: Change work_queue teardown to work for kernels earlier than 2.6.22
For kernels earlier than 2.6.22, we can't cancel work, so we have to flush the
work queue to completion before destroying it.
Priority: normal
Signed-off-by: Andy Walls <[EMAIL PROTECTED]>
---
linux/drivers/media/video/cx18/cx18-driver.c | 11 +++++++++++
v4l/versions.txt | 2 --
2 files changed, 11 insertions(+), 2 deletions(-)
diff -r 91440b07aa64 -r 47b5de4dca84
linux/drivers/media/video/cx18/cx18-driver.c
--- a/linux/drivers/media/video/cx18/cx18-driver.c Tue Nov 25 19:43:05
2008 -0500
+++ b/linux/drivers/media/video/cx18/cx18-driver.c Tue Nov 25 20:02:45
2008 -0500
@@ -918,6 +918,7 @@ int cx18_init_on_first_open(struct cx18
return 0;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
static void cx18_cancel_epu_work_orders(struct cx18 *cx)
{
int i;
@@ -925,6 +926,7 @@ static void cx18_cancel_epu_work_orders(
cancel_work_sync(&cx->epu_work_order[i].work);
}
+#endif
static void cx18_remove(struct pci_dev *pci_dev)
{
struct cx18 *cx = pci_get_drvdata(pci_dev);
@@ -938,11 +940,20 @@ static void cx18_remove(struct pci_dev *
/* Interrupts */
cx18_sw1_irq_disable(cx, IRQ_CPU_TO_EPU | IRQ_APU_TO_EPU);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
cx18_sw2_irq_disable(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
cx18_halt_firmware(cx);
cx18_cancel_epu_work_orders(cx);
+#else
+
+ flush_workqueue(cx->work_queue);
+
+ cx18_sw2_irq_disable(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
+
+ cx18_halt_firmware(cx);
+#endif
destroy_workqueue(cx->work_queue);
diff -r 91440b07aa64 -r 47b5de4dca84 v4l/versions.txt
--- a/v4l/versions.txt Tue Nov 25 19:43:05 2008 -0500
+++ b/v4l/versions.txt Tue Nov 25 20:02:45 2008 -0500
@@ -20,8 +20,6 @@ DVB_DRX397XD
DVB_DRX397XD
# Assumes struct input_dev has a dev field
DVB_DM1105
-# Need cancel_work_sync
-VIDEO_CX18
[2.6.20]
#This driver requires HID_REQ_GET_REPORT
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/47b5de4dca8458d36add949d3ef5c00609770670
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits