rpms/kernel/devel linux-2.6-lirc-semaphore-to-completion.patch, NONE, 1.1 kernel.spec, 1.327, 1.328
Jarod Wilson (jwilson)
fedora-extras-commits at redhat.com
Thu Dec 20 17:15:50 UTC 2007
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27653
Modified Files:
kernel.spec
Added Files:
linux-2.6-lirc-semaphore-to-completion.patch
Log Message:
* Thu Dec 20 2007 Jarod Wilson <jwilson at redhat.com>
- Fix up lirc to build w/2.6.24 (Stefan Lippers-Hollmann)
linux-2.6-lirc-semaphore-to-completion.patch:
--- NEW FILE linux-2.6-lirc-semaphore-to-completion.patch ---
diff -Nrup a/drivers/input/lirc/lirc_dev.c b/drivers/input/lirc/lirc_dev.c
--- a/drivers/input/lirc/lirc_dev.c 2007-12-16 16:13:43.000000000 +0100
+++ b/drivers/input/lirc/lirc_dev.c 2007-12-16 16:13:59.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/smp_lock.h>
+#include <linux/completion.h>
#include <linux/uaccess.h>
#include <linux/errno.h>
#include <asm/semaphore.h>
@@ -73,8 +74,8 @@ struct irctl
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;
@@ -180,7 +181,7 @@ static int lirc_thread(void *irctl)
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);
@@ -205,11 +206,11 @@ static int lirc_thread(void *irctl)
} 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);
@@ -225,7 +226,7 @@ int lirc_register_plugin(struct lirc_plu
#ifdef LIRC_HAVE_DEVFS_24
char name[16];
#endif
- DECLARE_MUTEX_LOCKED(tn);
+ DECLARE_COMPLETION(tn);
if (!p) {
printk(KERN_ERR "lirc_dev: lirc_register_plugin: "
@@ -376,7 +377,7 @@ int lirc_register_plugin(struct lirc_plu
err = -ECHILD;
goto out_sysfs;
}
- down(&tn);
+ wait_for_completion(&tn);
ir->t_notify = NULL;
}
ir->attached = 1;
@@ -406,8 +407,8 @@ EXPORT_SYMBOL(lirc_register_plugin);
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(KERN_ERR "lirc_dev: lirc_unregister_plugin: "
@@ -437,8 +438,8 @@ int lirc_unregister_plugin(int minor)
p = find_task_by_pid(ir->tpid);
wake_up_process(p);
- up(&tn2);
- down(&tn);
+ complete(&tn2);
+ wait_for_completion(&tn);
ir->t_notify = NULL;
ir->t_notify2 = NULL;
}
diff -Nrup a/drivers/input/lirc/lirc_it87.c b/drivers/input/lirc/lirc_it87.c
--- a/drivers/input/lirc/lirc_it87.c 2007-12-16 16:13:43.000000000 +0100
+++ b/drivers/input/lirc/lirc_it87.c 2007-12-16 16:13:59.000000000 +0100
@@ -872,7 +872,7 @@ static int init_port(void)
/* Leaving MB PnP Mode */
it87_write(IT87_CFGCTRL, 0x2);
- retval = request_irq(irq, it87_interrupt, 0 /*SA_INTERRUPT*/,
+ retval = request_irq(irq, it87_interrupt, 0 /*IRQF_DISABLED*/,
LIRC_DRIVER_NAME, NULL);
if (retval < 0) {
printk(KERN_ERR LIRC_DRIVER_NAME
diff -Nrup a/drivers/input/lirc/lirc_pvr150.c b/drivers/input/lirc/lirc_pvr150.c
--- a/drivers/input/lirc/lirc_pvr150.c 2007-12-16 16:13:43.000000000 +0100
+++ b/drivers/input/lirc/lirc_pvr150.c 2007-12-16 16:13:59.000000000 +0100
@@ -51,6 +51,7 @@
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
+#include <linux/completion.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/i2c.h>
@@ -84,8 +85,8 @@ struct IR
struct semaphore buf_sem;
/* RX polling thread data */
- struct semaphore *t_notify;
- struct semaphore *t_notify2;
+ struct completion *t_notify;
+ struct completion *t_notify2;
int shutdown;
int tpid;
@@ -254,7 +255,7 @@ static int lirc_thread(void *arg)
daemonize("lirc_pvr150");
if (ir->t_notify != NULL)
- up(ir->t_notify);
+ complete(ir->t_notify);
dprintk("poll thread started\n");
@@ -286,11 +287,11 @@ static int lirc_thread(void *arg)
} 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("poll thread ended\n");
return 0;
@@ -1215,7 +1216,7 @@ static int ir_attach(struct i2c_adapter
client_template.adapter = adap;
memcpy(&ir->c_rx, &client_template, sizeof(struct i2c_client));
if (have_rx) {
- DECLARE_MUTEX_LOCKED(tn);
+ DECLARE_COMPLETION(tn);
/* I2C attach to device */
ir->c_rx.addr = 0x71;
@@ -1233,7 +1234,7 @@ static int ir_attach(struct i2c_adapter
ret = -ECHILD;
goto err;
}
- down(&tn);
+ wait_for_completion(&tn);
ir->t_notify = NULL;
}
@@ -1295,8 +1296,8 @@ static int ir_detach(struct i2c_client *
down(&ir->lock);
if (client == &ir->c_rx) {
- DECLARE_MUTEX_LOCKED(tn);
- DECLARE_MUTEX_LOCKED(tn2);
+ DECLARE_COMPLETION(tn);
+ DECLARE_COMPLETION(tn2);
/* end up polling thread */
if (ir->tpid >= 0) {
@@ -1309,8 +1310,8 @@ static int ir_detach(struct i2c_client *
p = find_task_by_pid(ir->tpid);
wake_up_process(p);
}
- up(&tn2);
- down(&tn);
+ complete(&tn2);
+ wait_for_completion(&tn);
ir->t_notify = NULL;
ir->t_notify2 = NULL;
}
diff -Nrup a/drivers/input/lirc/lirc_serial.c b/drivers/input/lirc/lirc_serial.c
--- a/drivers/input/lirc/lirc_serial.c 2007-12-16 16:13:43.000000000 +0100
+++ b/drivers/input/lirc/lirc_serial.c 2007-12-16 16:13:59.000000000 +0100
@@ -920,7 +920,7 @@ static int set_use_inc(void *data)
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 -Nrup a/drivers/input/lirc/lirc_sir.c b/drivers/input/lirc/lirc_sir.c
--- a/drivers/input/lirc/lirc_sir.c 2007-12-16 16:13:43.000000000 +0100
+++ b/drivers/input/lirc/lirc_sir.c 2007-12-16 16:13:59.000000000 +0100
@@ -1002,7 +1002,7 @@ static int init_port(void)
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
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.327
retrieving revision 1.328
diff -u -r1.327 -r1.328
--- kernel.spec 20 Dec 2007 04:46:23 -0000 1.327
+++ kernel.spec 20 Dec 2007 17:15:13 -0000 1.328
@@ -20,8 +20,6 @@
# kernel spec when the kernel is rebased, so fedora_build automatically
# works out to the offset from the rebase, so it doesn't get too ginormous.
#
-# Bah. Have to set this to a negative for the moment to fix rpm ordering after
-# moving the spec file. cvs sucks. Should be sure to fix this once 2.6.23 is out.
%define fedora_cvs_origin 209
%define fedora_build %(R="$Revision$"; R="${R%% \$}"; R="${R##: 1.}"; expr $R - %{fedora_cvs_origin})
@@ -637,6 +635,7 @@
Patch1504: linux-2.6-xfs-optimize-away-realtime-tests.patch
Patch1509: linux-2.6-xfs-setfattr-32bit-compat.patch
Patch1515: linux-2.6-lirc.patch
+Patch1516: linux-2.6-lirc-semaphore-to-completion.patch
Patch1520: linux-2.6-dcdbas-autoload.patch
# drm-mm catchup (modesetting, ...)
@@ -1155,7 +1154,8 @@
ApplyPatch linux-2.6-i386-vdso-install-unstripped-copies-on-disk.patch
# http://www.lirc.org/
-#ApplyPatch linux-2.6-lirc.patch
+ApplyPatch linux-2.6-lirc.patch
+ApplyPatch linux-2.6-lirc-semaphore-to-completion.patch
# DMI autoloading for dcdbas driver
ApplyPatch linux-2.6-dcdbas-autoload.patch
@@ -1741,6 +1741,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Thu Dec 20 2007 Jarod Wilson <jwilson at redhat.com>
+- Fix up lirc to build w/2.6.24 (Stefan Lippers-Hollmann)
+
* Thu Dec 20 2007 Dave Airlie <airlied at redhat.com>
- add MODULE_DEVICE_TABLE to radeon and i915 drivers
More information about the fedora-extras-commits
mailing list