Hi all,
On Tue, Sep 15, 2009 at 07:23:07AM +0200, Marcel Telka wrote:
> After upgrade to video4linux-kmdl-2.6.18-128.7.1.el5xen-20090907-90.el5
> I found there is not longer cx88-dvb kernel module available. What can I
> do to have the module back?
The root cause is fix for bug
http://bugzilla.kernel.org/show_bug.cgi?id=9637 integrated into v4l-dvb
sources few weeks ago. The fix introduced dependence on kernel version
2.6.22.
I created a patch against v4l-dvb-13c47deee3b1.tar.bz2 (see attached)
which basically removes the fix mentioned above. I rebuilt the package,
installed, tested: it works great.
Would it be possible to have this patch (or any modified version)
included into video4linux-kmdl packages for CentOS 5?
Thanks a lot.
--
+-------------------------------------------+
| Marcel Telka e-mail: [email protected] |
| homepage: http://telka.sk/ |
| jabber: [email protected] |
+-------------------------------------------+
diff -urN v4l-dvb-13c47deee3b1.old/linux/drivers/media/video/cx88/cx88-input.c
v4l-dvb-13c47deee3b1/linux/drivers/media/video/cx88/cx88-input.c
--- v4l-dvb-13c47deee3b1.old/linux/drivers/media/video/cx88/cx88-input.c
2009-09-07 17:38:46.000000000 +0200
+++ v4l-dvb-13c47deee3b1/linux/drivers/media/video/cx88/cx88-input.c
2009-09-16 19:58:20.000000000 +0200
@@ -23,7 +23,7 @@
*/
#include <linux/init.h>
-#include <linux/hrtimer.h>
+#include <linux/delay.h>
#include <linux/input.h>
#include <linux/pci.h>
#include <linux/module.h>
@@ -49,7 +49,7 @@
/* poll external decoder */
int polling;
- struct hrtimer timer;
+ struct delayed_work work;
u32 gpio_addr;
u32 last_gpio;
u32 mask_keycode;
@@ -145,28 +145,31 @@
}
}
-static enum hrtimer_restart cx88_ir_work(struct hrtimer *timer)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+static void cx88_ir_work(void *data)
+#else
+static void cx88_ir_work(struct work_struct *work)
+#endif
{
- unsigned long missed;
- struct cx88_IR *ir = container_of(timer, struct cx88_IR, timer);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ struct cx88_IR *ir = data;
+#else
+ struct cx88_IR *ir = container_of(work, struct cx88_IR, work.work);
+#endif
cx88_ir_handle_key(ir);
- missed = hrtimer_forward_now(&ir->timer,
- ktime_set(0, ir->polling * 1000000));
- if (missed > 1)
- ir_dprintk("Missed ticks %ld\n", missed - 1);
-
- return HRTIMER_RESTART;
+ schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling));
}
void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
{
if (ir->polling) {
- hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- ir->timer.function = cx88_ir_work;
- hrtimer_start(&ir->timer,
- ktime_set(0, ir->polling * 1000000),
- HRTIMER_MODE_REL);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ INIT_DELAYED_WORK(&ir->work, cx88_ir_work, ir);
+#else
+ INIT_DELAYED_WORK(&ir->work, cx88_ir_work);
+#endif
+ schedule_delayed_work(&ir->work, 0);
}
if (ir->sampling) {
core->pci_irqmask |= PCI_INT_IR_SMPINT;
@@ -183,7 +186,7 @@
}
if (ir->polling)
- hrtimer_cancel(&ir->timer);
+ cancel_delayed_work_sync(&ir->work);
}
/* ---------------------------------------------------------------------- */
diff -urN v4l-dvb-13c47deee3b1.old/v4l/versions.txt
v4l-dvb-13c47deee3b1/v4l/versions.txt
--- v4l-dvb-13c47deee3b1.old/v4l/versions.txt 2009-09-07 17:38:46.000000000
+0200
+++ v4l-dvb-13c47deee3b1/v4l/versions.txt 2009-09-16 19:57:50.000000000
+0200
@@ -54,8 +54,6 @@
DVB_DM1105
# This driver needs print_hex_dump
DVB_FIREDTV
-# This driver needs hrtimer API
-VIDEO_CX88
[2.6.20]
#This driver requires HID_REQ_GET_REPORT
_______________________________________________
atrpms-users mailing list
[email protected]
http://lists.atrpms.net/mailman/listinfo/atrpms-users