Gentoo Archives: gentoo-commits

From: "Joerg Bornkessel (hd_brummy)" <hd_brummy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-misc/lirc/files: lirc-0.8.3_pre1-kernel-2.6.24.diff
Date: Wed, 26 Dec 2007 19:29:38
Message-Id: E1J7bwY-00011t-3g@stork.gentoo.org
1 hd_brummy 07/12/26 19:29:30
2
3 Added: lirc-0.8.3_pre1-kernel-2.6.24.diff
4 Log:
5 bug 200508 fixed; thanks to A.Stirling M.Marte T.Kost
6 (Portage version: 2.1.3.19)
7
8 Revision Changes Path
9 1.1 app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff?rev=1.1&content-type=text/plain
13
14 Index: lirc-0.8.3_pre1-kernel-2.6.24.diff
15 ===================================================================
16 #bug 200508
17
18 --- /var/tmp/portage/app-misc/lirc-0.8.3_pre1/work/lirc-0.8.3pre1/drivers/lirc_dev/lirc_dev.c 2007-09-27 15:47:20.000000000 -0400
19 +++ lirc-0.8.3pre1/drivers/lirc_dev/lirc_dev.c 2007-11-27 11:06:41.000000000 -0500
20 @@ -41,6 +41,7 @@
21 #include <linux/fs.h>
22 #include <linux/poll.h>
23 #include <linux/smp_lock.h>
24 +#include <linux/completion.h>
25 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
26 #include <linux/uaccess.h>
27 #include <linux/errno.h>
28 @@ -86,8 +87,8 @@
29 struct lirc_buffer *buf;
30
31 int tpid;
32 - struct semaphore *t_notify;
33 - struct semaphore *t_notify2;
34 + struct completion *t_notify;
35 + struct completion *t_notify2;
36 int shutdown;
37 long jiffies_to_wait;
38
39 @@ -193,7 +194,7 @@
40 daemonize("lirc_dev");
41
42 if (ir->t_notify != NULL)
43 - up(ir->t_notify);
44 + complete(ir->t_notify);
45
46 dprintk(LOGHEAD "poll thread started\n", ir->p.name, ir->p.minor);
47
48 @@ -218,11 +219,11 @@
49 } while (!ir->shutdown);
50
51 if (ir->t_notify2 != NULL)
52 - down(ir->t_notify2);
53 + wait_for_completion(ir->t_notify2);
54
55 ir->tpid = -1;
56 if (ir->t_notify != NULL)
57 - up(ir->t_notify);
58 + complete(ir->t_notify);
59
60 dprintk(LOGHEAD "poll thread ended\n", ir->p.name, ir->p.minor);
61
62 @@ -238,7 +239,7 @@
63 #ifdef LIRC_HAVE_DEVFS_24
64 char name[16];
65 #endif
66 - DECLARE_MUTEX_LOCKED(tn);
67 + DECLARE_COMPLETION(tn);
68
69 if (!p) {
70 printk(KERN_ERR "lirc_dev: lirc_register_plugin: "
71 @@ -389,7 +390,7 @@
72 err = -ECHILD;
73 goto out_sysfs;
74 }
75 - down(&tn);
76 + wait_for_completion(&tn);
77 ir->t_notify = NULL;
78 }
79 ir->attached = 1;
80 @@ -425,8 +426,8 @@
81 int lirc_unregister_plugin(int minor)
82 {
83 struct irctl *ir;
84 - DECLARE_MUTEX_LOCKED(tn);
85 - DECLARE_MUTEX_LOCKED(tn2);
86 + DECLARE_COMPLETION(tn);
87 + DECLARE_COMPLETION(tn2);
88
89 if (minor < 0 || minor >= MAX_IRCTL_DEVICES) {
90 printk(KERN_ERR "lirc_dev: lirc_unregister_plugin: "
91 @@ -462,8 +463,8 @@
92 /* 2.2.x does not export wake_up_process() */
93 wake_up_interruptible(ir->p.get_queue(ir->p.data));
94 #endif
95 - up(&tn2);
96 - down(&tn);
97 + complete(&tn2);
98 + wait_for_completion(&tn);
99 ir->t_notify = NULL;
100 ir->t_notify2 = NULL;
101 }
102
103
104
105 --
106 gentoo-commits@g.o mailing list