SOURCES: lirc-2.6.24.patch (NEW) - patch for building with kernel ...
hawk
hawk at pld-linux.org
Wed Jan 30 18:54:33 CET 2008
Author: hawk Date: Wed Jan 30 17:54:33 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- patch for building with kernel 2.6.24, taken from gentoo and ported
for lirc 0.8.2
---- Files affected:
SOURCES:
lirc-2.6.24.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/lirc-2.6.24.patch
diff -u /dev/null SOURCES/lirc-2.6.24.patch:1.1
--- /dev/null Wed Jan 30 18:54:33 2008
+++ SOURCES/lirc-2.6.24.patch Wed Jan 30 18:54:28 2008
@@ -0,0 +1,110 @@
+diff -urN lirc-0.8.2.orig/drivers/lirc_dev/lirc_dev.c lirc-0.8.2/drivers/lirc_dev/lirc_dev.c
+--- lirc-0.8.2.orig/drivers/lirc_dev/lirc_dev.c 2008-01-30 18:41:11.000000000 +0100
++++ lirc-0.8.2/drivers/lirc_dev/lirc_dev.c 2008-01-30 18:45:35.860566048 +0100
+@@ -45,6 +45,7 @@
+ #include <linux/fs.h>
+ #include <linux/poll.h>
+ #include <linux/smp_lock.h>
++#include <linux/completion.h>
+ #include <asm/uaccess.h>
+ #include <asm/semaphore.h>
+ #include <asm/errno.h>
+@@ -85,8 +86,8 @@
+ struct lirc_buffer *buf;
+
+ int tpid;
+- struct semaphore *t_notify;
+- struct semaphore *t_notify2;
++ struct completion *t_notify;
++ struct completion *t_notify2;
+ int shutdown;
+ long jiffies_to_wait;
+
+@@ -194,7 +195,7 @@
+ daemonize("lirc_dev");
+
+ if (ir->t_notify != NULL) {
+- up(ir->t_notify);
++ complete(ir->t_notify);
+ }
+
+ dprintk(LOGHEAD "poll thread started\n", ir->p.name, ir->p.minor);
+@@ -221,12 +222,12 @@
+ } while (!ir->shutdown);
+
+ if (ir->t_notify2 != NULL) {
+- down(ir->t_notify2);
++ wait_for_completion(ir->t_notify2);
+ }
+
+ ir->tpid = -1;
+ if (ir->t_notify != NULL) {
+- up(ir->t_notify);
++ complete(ir->t_notify);
+ }
+
+ dprintk(LOGHEAD "poll thread ended\n", ir->p.name, ir->p.minor);
+@@ -246,7 +247,7 @@
+ #ifdef LIRC_HAVE_DEVFS_24
+ char name[16];
+ #endif
+- DECLARE_MUTEX_LOCKED(tn);
++ DECLARE_COMPLETION(tn);
+
+ if (!p) {
+ printk("lirc_dev: lirc_register_plugin: "
+@@ -397,7 +398,7 @@
+ err = -ECHILD;
+ goto out_sysfs;
+ }
+- down(&tn);
++ wait_for_completion(&tn);
+ ir->t_notify = NULL;
+ }
+ ir->attached = 1;
+@@ -435,8 +436,8 @@
+ int lirc_unregister_plugin(int minor)
+ {
+ struct irctl *ir;
+- DECLARE_MUTEX_LOCKED(tn);
+- DECLARE_MUTEX_LOCKED(tn2);
++ DECLARE_COMPLETION(tn);
++ DECLARE_COMPLETION(tn2);
+
+ if (minor < 0 || minor >= MAX_IRCTL_DEVICES) {
+ printk("lirc_dev: lirc_unregister_plugin: "
+@@ -472,8 +473,8 @@
+ /* 2.2.x does not export wake_up_process() */
+ wake_up_interruptible(ir->p.get_queue(ir->p.data));
+ #endif
+- up(&tn2);
+- down(&tn);
++ complete(&tn2);
++ wait_for_completion(&tn);
+ ir->t_notify = NULL;
+ ir->t_notify2 = NULL;
+ }
+diff -urN lirc-0.8.2.orig/drivers/lirc_serial/lirc_serial.c lirc-0.8.2/drivers/lirc_serial/lirc_serial.c
+--- lirc-0.8.2.orig/drivers/lirc_serial/lirc_serial.c 2008-01-30 18:41:11.000000000 +0100
++++ lirc-0.8.2/drivers/lirc_serial/lirc_serial.c 2008-01-30 18:43:51.671989132 +0100
+@@ -1002,7 +1002,7 @@
+ do_gettimeofday(&lasttv);
+
+ result=request_irq(irq,irq_handler,
+- SA_INTERRUPT | (share_irq ? SA_SHIRQ:0),
++ IRQF_DISABLED | (share_irq ? IRQF_SHARED:0),
+ LIRC_DRIVER_NAME,(void *)&hardware);
+
+ switch(result)
+diff -urN lirc-0.8.2.orig/drivers/lirc_sir/lirc_sir.c lirc-0.8.2/drivers/lirc_sir/lirc_sir.c
+--- lirc-0.8.2.orig/drivers/lirc_sir/lirc_sir.c 2008-01-30 18:41:11.000000000 +0100
++++ lirc-0.8.2/drivers/lirc_sir/lirc_sir.c 2008-01-30 18:42:54.259100415 +0100
+@@ -1056,7 +1056,7 @@
+ return -EBUSY;
+ }
+ #endif
+- retval = request_irq(irq, sir_interrupt, SA_INTERRUPT,
++ retval = request_irq(irq, sir_interrupt, IRQF_DISABLED,
+ LIRC_DRIVER_NAME, NULL);
+ if (retval < 0) {
+ # ifndef LIRC_ON_SA1100
================================================================
More information about the pld-cvs-commit
mailing list