aboutsummaryrefslogtreecommitdiff
path: root/system/lirc
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-13 06:57:17 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-13 17:58:11 -0500
commit085fc4cb823d1b0de05afdf2b0f5f279851c6486 (patch)
tree7a040e74fb2a611d19b65f5b5ba7610aec69c721 /system/lirc
parentf71725b388a7251b8861bf0df14a96e004a4e14f (diff)
system/lirc: Patched for recent kernels.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/lirc')
-rw-r--r--system/lirc/lirc.SlackBuild6
-rw-r--r--system/lirc/patches/lirc-0.9.0-atiusb_kfifo.patch14
-rw-r--r--system/lirc/patches/lirc-0.9.0-kernel-2.6.39-fixes.patch67
3 files changed, 86 insertions, 1 deletions
diff --git a/system/lirc/lirc.SlackBuild b/system/lirc/lirc.SlackBuild
index a572d5c39fe99..79a6ffff8a89d 100644
--- a/system/lirc/lirc.SlackBuild
+++ b/system/lirc/lirc.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=lirc
VERSION=${VERSION:-0.9.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
KERNEL=${KERNEL:-$(uname -r)}
@@ -74,6 +74,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Patch for recent kernels, thanks Gentoo
+patch -p1 < $CWD/patches/lirc-0.9.0-kernel-2.6.39-fixes.patch
+patch -p1 < $CWD/patches/lirc-0.9.0-atiusb_kfifo.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/lirc/patches/lirc-0.9.0-atiusb_kfifo.patch b/system/lirc/patches/lirc-0.9.0-atiusb_kfifo.patch
new file mode 100644
index 0000000000000..32edb244b4122
--- /dev/null
+++ b/system/lirc/patches/lirc-0.9.0-atiusb_kfifo.patch
@@ -0,0 +1,14 @@
+--- a/drivers/lirc_atiusb/lirc_atiusb.c 2012-07-17 16:04:39.000000000 -0400
++++ b/drivers/lirc_atiusb/lirc_atiusb.c 2012-07-17 16:19:06.000000000 -0400
+@@ -1050,7 +1050,11 @@
+ goto new_irctl_failure_check;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
+ if (lirc_buffer_init(driver->rbuf, dclen, 1)) {
++#else
++ if (lirc_buffer_init(driver->rbuf, dclen, 2)) {
++#endif
+ mem_failure = 4;
+ goto new_irctl_failure_check;
+ }
diff --git a/system/lirc/patches/lirc-0.9.0-kernel-2.6.39-fixes.patch b/system/lirc/patches/lirc-0.9.0-kernel-2.6.39-fixes.patch
new file mode 100644
index 0000000000000..624737090bbe5
--- /dev/null
+++ b/system/lirc/patches/lirc-0.9.0-kernel-2.6.39-fixes.patch
@@ -0,0 +1,67 @@
+diff -u a/drivers/lirc_atiusb/lirc_atiusb.c b/drivers/lirc_atiusb/lirc_atiusb.c
+--- a/drivers/lirc_atiusb/lirc_atiusb.c
++++ b/drivers/lirc_atiusb/lirc_atiusb.c
+@@ -48,7 +48,9 @@
+ #include <linux/slab.h>
+ #include <linux/module.h>
+ #include <linux/kmod.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ #include <linux/smp_lock.h>
++#endif
+ #include <linux/completion.h>
+ #include <linux/uaccess.h>
+ #include <linux/usb.h>
+diff -u a/drivers/lirc_i2c/lirc_i2c.c b/drivers/lirc_i2c/lirc_i2c.c
+--- a/drivers/lirc_i2c/lirc_i2c.c
++++ b/drivers/lirc_i2c/lirc_i2c.c
+@@ -555,8 +555,8 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
+ kfree(ir);
+ return -EINVAL;
+ }
+- printk(KERN_INFO "lirc_i2c: chip 0x%x found @ 0x%02x (%s)\n",
+- adap->id, addr, ir->c.name);
++ printk(KERN_INFO "lirc_i2c: chip found @ 0x%02x (%s)\n",
++ addr, ir->c.name);
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
+ /* register device */
+diff -u a/drivers/lirc_wpc8769l/lirc_wpc8769l.c b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
+--- a/drivers/lirc_wpc8769l/lirc_wpc8769l.c
++++ b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
+@@ -361,14 +361,22 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs)
+ size = count << 3;
+
+ ldata = (unsigned long *) data_buf;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ next_one = generic_find_next_le_bit(ldata, size, 0);
++#else
++ next_one = find_next_zero_bit_le(ldata, size, 0);
++#endif
+
+ if (next_one > 0)
+ put_pulse_bit(next_one
+ * WPC8769L_USECS_PER_BIT);
+
+ while (next_one < size) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ next_zero = generic_find_next_zero_le_bit(ldata,
++#else
++ next_zero = find_next_zero_bit_le(ldata,
++#endif
+ size, next_one + 1);
+
+ put_space_bit(
+@@ -376,7 +384,11 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs)
+ * WPC8769L_USECS_PER_BIT);
+
+ if (next_zero < size) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ next_one = generic_find_next_le_bit(ldata,
++#else
++ next_one = find_next_bit_le(ldata,
++#endif
+ size, next_zero + 1);
+
+ put_pulse_bit(
+--
+1.7.5.4