Package: lirc-modules-source
Version: 0.8.0-13
Severity: normal
Tags: patch



-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash

Versions of packages lirc-modules-source depends on:
ii  debconf [debconf-2.0]         1.5.19     Debian configuration management sy
ii  debhelper                     6.0.4      helper programs for debian/rules
ii  debianutils                   2.28.2     Miscellaneous utilities specific t
ii  ucf                           3.004      Update Configuration File: preserv

Versions of packages lirc-modules-source recommends:
ii  dpkg-dev                      1.14.16.6  package building tools for Debian
ii  gcc [c-compiler]              4:4.2.2-2  The GNU C compiler
ii  gcc-3.3 [c-compiler]          1:3.3.6-15 The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-19   The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.2-7    The GNU C compiler
pn  kernel-package                <none>     (no description available)
ii  make                          3.81-3     The GNU version of the "make" util

-- debconf information:
  lirc-modules-source/use_lirc_hints: true
  lirc-modules-source/parallel_irq: 7
* lirc-modules-source/do-build: false
  lirc-modules-source/parallel_timer: 65536
  lirc-modules-source/sir_type: Other
* lirc-modules-source/serial_softcarrier: false
  lirc-modules-source/kernel-source-not-found:
* lirc-modules-source/serial_transmitter: false
  lirc-modules-source/it87_type: Standard
  lirc-modules-source/not_needed:
* lirc-modules-source/serial_port: 0x3f8
* lirc-modules-source/drivers: serial
* lirc-modules-source/serial_irq: 4
* lirc-modules-source/serial_type: Other
  lirc-modules-source/kernel-source: /usr/src/linux/
  lirc-modules-source/sir_irq: 3
  lirc-modules-source/sir_port: 0x2f8
  lirc-modules-source/parallel_port: 0x378
* lirc-modules-source/what_next:
--- lirc_dev.c.orig	2008-01-31 11:01:01.000000000 +0100
+++ lirc_dev.c	2008-01-31 11:04:25.000000000 +0100
@@ -40,6 +40,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 @@
 	unsigned int chunk_size;
 
 	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: "
@@ -398,7 +399,7 @@
 			err = -ECHILD;
 			goto out_sysfs;
 		}
-		down(&tn);
+		wait_for_completion(&tn);
 		ir->t_notify = NULL;
 	}
 	ir->attached = 1;
@@ -436,8 +437,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: "
@@ -473,8 +474,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;
 	}
@@ -869,8 +870,7 @@
 	return SUCCESS;
 
 out_unregister:
-	if(unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME))
-		printk(KERN_ERR "lirc_dev: unregister_chrdev failed!\n");
+	unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
 out:
 	return -1;
 }
@@ -894,15 +894,8 @@
  */
 void cleanup_module(void)
 {
-	int ret;
-
-	ret = unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
+	unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
 	class_destroy(lirc_class);
-
-	if(ret)
-		printk("lirc_dev: error in module_unregister_chrdev: %d\n", ret);
-	else
-		dprintk("lirc_dev: module successfully unloaded\n");
 }
 
 MODULE_DESCRIPTION("LIRC base driver module");
--- lirc_serial.c.ORIG  2007-12-14 22:13:40.000000000 +0200
+++ lirc_serial.c       2007-12-14 22:13:47.000000000 +0200
@@ -961,7 +961,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) {

Reply via email to