[arch-commits] Commit in lirc/trunk (4 files)

Jan de Groot jgc at archlinux.org
Wed Jun 8 09:51:14 UTC 2011


    Date: Wednesday, June 8, 2011 @ 05:51:14
  Author: jgc
Revision: 126857

Add upstream patches from git, fixes issues with large config files, atiusb and wpc8769 drivers

Added:
  lirc/trunk/lirc_atiusb-kfifo.patch
  lirc/trunk/lirc_wpc8769l.patch
  lirc/trunk/lircd-handle-large-config.patch
Modified:
  lirc/trunk/PKGBUILD

---------------------------------+
 PKGBUILD                        |    9 +++
 lirc_atiusb-kfifo.patch         |   31 +++++++++++++
 lirc_wpc8769l.patch             |   88 ++++++++++++++++++++++++++++++++++++++
 lircd-handle-large-config.patch |   39 ++++++++++++++++
 4 files changed, 167 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-06-08 05:54:09 UTC (rev 126856)
+++ PKGBUILD	2011-06-08 09:51:14 UTC (rev 126857)
@@ -13,9 +13,15 @@
 makedepends=('help2man' 'kernel26-headers>=2.6.39' 'kernel26-headers<2.6.40' 'alsa-lib' 'libx11' 'libftdi' 'libirman' 'python')
 options=('!makeflags' '!strip')
 source=(http://prdownloads.sourceforge.net/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2
+        lirc_wpc8769l.patch
+        lircd-handle-large-config.patch
+        lirc_atiusb-kfifo.patch
         kernel-2.6.39.patch
 	lircd lircmd lirc.logrotate lircd.conf irexec.conf irexecd)
 md5sums=('b232aef26f23fe33ea8305d276637086'
+         '1cce37e18e3f6f46044abab29016d18f'
+         'b70cc9640505205446ec47b7d4779f38'
+         '1f8b104a2365d9f93404b143f499059b'
          '087a7d102e1c96bf1179f38db2b0b237'
          '8d0e238dc0eda95e340fe570605da492'
          '85f7fdac55e5256967241864049bf5e9'
@@ -26,6 +32,9 @@
 
 build() {
   cd "${srcdir}/lirc-${pkgver}"
+  patch -Np1 -i "${srcdir}/lirc_wpc8769l.patch"
+  patch -Np1 -i "${srcdir}/lircd-handle-large-config.patch"
+  patch -Np1 -i "${srcdir}/lirc_atiusb-kfifo.patch"
   patch -Np1 -i "${srcdir}/kernel-2.6.39.patch"
 
   sed -i '/AC_PATH_XTRA/d' configure.ac

Added: lirc_atiusb-kfifo.patch
===================================================================
--- lirc_atiusb-kfifo.patch	                        (rev 0)
+++ lirc_atiusb-kfifo.patch	2011-06-08 09:51:14 UTC (rev 126857)
@@ -0,0 +1,31 @@
+From ec3c5660e67c122e2d5eb9cfa838c9709fccf8e0 Mon Sep 17 00:00:00 2001
+From: Jason Martin <publicmsu at gmail.com>
+Date: Fri, 3 Jun 2011 00:12:51 -0400
+Subject: [PATCH] lirc_atiusb: fix buffer alloc to work with new kfifo
+
+I came across posts with regards to lirc_atiusb and its compatibility
+with newer kernels, and their use of kfifo.I spent a little bit of time
+this evening, and was able to correct the issues with the driver, and
+now have a functioning lirc_atiusb device under the 2.6.38 kernel.
+
+Signed-off-by: Jarod Wilson <jarod at redhat.com>
+---
+ drivers/lirc_atiusb/lirc_atiusb.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/lirc_atiusb/lirc_atiusb.c b/drivers/lirc_atiusb/lirc_atiusb.c
+index 52080de..bf2b631 100644
+--- a/drivers/lirc_atiusb/lirc_atiusb.c
++++ b/drivers/lirc_atiusb/lirc_atiusb.c
+@@ -1048,7 +1048,7 @@ static struct atirf_dev *new_irctl(struct usb_interface *intf)
+ 		goto new_irctl_failure_check;
+ 	}
+ 
+-	if (lirc_buffer_init(driver->rbuf, dclen, 1)) {
++	if (lirc_buffer_init(driver->rbuf, dclen, 2)) {
+ 		mem_failure = 4;
+ 		goto new_irctl_failure_check;
+ 	}
+-- 
+1.7.0.1
+

Added: lirc_wpc8769l.patch
===================================================================
--- lirc_wpc8769l.patch	                        (rev 0)
+++ lirc_wpc8769l.patch	2011-06-08 09:51:14 UTC (rev 126857)
@@ -0,0 +1,88 @@
+From 413e83bf504fe9a9a177f27742220cfcb184b034 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Juan=20Jes=C3=BAs=20Garc=C3=ADa=20de=20Soria=20Lucena?= <skandalfo at gmail.com>
+Date: Wed, 30 Mar 2011 16:46:35 -0400
+Subject: [PATCH] Make lirc_wpc8769l functional again
+
+Signed-off-by: Jarod Wilson <jarod at redhat.com>
+---
+ drivers/lirc_wpc8769l/lirc_wpc8769l.c |   28 +++++++++++++++++-----------
+ 1 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/lirc_wpc8769l/lirc_wpc8769l.c b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
+index f820d11..4d04063 100644
+--- a/drivers/lirc_wpc8769l/lirc_wpc8769l.c
++++ b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
+@@ -816,10 +816,6 @@ static int set_use_inc(void *data)
+ 	/* Reset last timeout value. */
+ 	lastus = 0;
+ 
+-	/* Init the read buffer. */
+-	if (lirc_buffer_init(&rbuf, sizeof(lirc_t), RBUF_LEN) < 0)
+-		return -ENOMEM;
+-
+ 	/* Acquire the IRQ. */
+ 	result = request_irq(irq, irq_handler,
+ 			   IRQF_DISABLED | IRQF_SHARED,
+@@ -863,9 +859,6 @@ static void set_use_dec(void *data)
+ 	/* Free the IRQ. */
+ 	free_irq(irq, THIS_MODULE);
+ 	dprintk("Freed IRQ %d\n", irq);
+-
+-	/* Free the RX buffer. */
+-	lirc_buffer_free(&rbuf);
+ }
+ 
+ static struct lirc_driver driver = {
+@@ -1065,19 +1058,29 @@ static int __init lirc_wpc8769l_module_init(void)
+ 	/* Do load-time checks. */
+ 	wpc8769l_power_up_and_check_if_we_woke_us_up();
+ 
++	/* Init the read buffer. */
++	if (lirc_buffer_init(&rbuf, sizeof(lirc_t), RBUF_LEN) < 0) {
++		rc = -ENOMEM;
++		goto exit_platform_exit;
++	}
++
+ 	/* Configure the driver hooks. */
+ 	driver.features = LIRC_CAN_REC_MODE2;
++	driver.dev = &lirc_wpc8769l_platform_dev->dev;
+ 	driver.minor = lirc_register_driver(&driver);
+ 	if (driver.minor < 0) {
+ 		eprintk("lirc_register_driver failed!\n");
+ 		rc = -EIO;
+-		goto exit_platform_exit;
++		goto exit_release_buffer;
+ 	}
+ 
+ 	iprintk("Driver loaded.\n");
+ 
+ 	return 0; /* Everything OK. */
+ 
++exit_release_buffer:
++	lirc_buffer_free(&rbuf);
++
+ exit_platform_exit:
+ 	lirc_wpc8769l_platform_exit();
+ 
+@@ -1095,12 +1098,15 @@ module_init(lirc_wpc8769l_module_init);
+ 
+ static void __exit lirc_wpc8769l_module_exit(void)
+ {
+-	/* Unregister the platform driver and device. */
+-	lirc_wpc8769l_platform_exit();
+-
+ 	/* Unregister the LIRC driver. */
+ 	lirc_unregister_driver(driver.minor);
+ 
++	/* Free the buffer. */
++	lirc_buffer_free(&rbuf);
++
++	/* Unregister the platform driver and device. */
++	lirc_wpc8769l_platform_exit();
++
+ 	/* Release the second range. */
+ 	if (baseport2)
+ 		release_region(baseport2, WPC8769L_IO_REGION_2_SIZE);
+-- 
+1.7.0.1
+

Added: lircd-handle-large-config.patch
===================================================================
--- lircd-handle-large-config.patch	                        (rev 0)
+++ lircd-handle-large-config.patch	2011-06-08 09:51:14 UTC (rev 126857)
@@ -0,0 +1,39 @@
+From 5efb56bf22a5077db564c766ba7cc37bc269231d Mon Sep 17 00:00:00 2001
+From: Jarod Wilson <jarod at redhat.com>
+Date: Wed, 6 Apr 2011 11:04:12 -0400
+Subject: [PATCH] lircd: handle larger config files in write_socket better
+
+Pointed out by Michael Zanetti on list, irsend LIST has issues with long
+config files, which didn't exist in maintainer mode, as we were using a
+do while loop to make sure we spit out everything. Just use that loop
+all the time.
+
+Signed-off-by: Jarod Wilson <jarod at redhat.com>
+---
+ daemons/lircd.c |    8 ++------
+ 1 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/daemons/lircd.c b/daemons/lircd.c
+index 6c21a3a..ddcca05 100644
+--- a/daemons/lircd.c
++++ b/daemons/lircd.c
+@@ -231,14 +231,10 @@ inline int write_socket(int fd, const char *buf, int len)
+ 	int done, todo = len;
+ 
+ 	while (todo) {
+-#ifdef SIM_REC
+ 		do {
+ 			done = write(fd, buf, todo);
+-		}
+-		while (done < 0 && errno == EAGAIN);
+-#else
+-		done = write(fd, buf, todo);
+-#endif
++		} while (done < 0 && errno == EAGAIN);
++
+ 		if (done <= 0)
+ 			return (done);
+ 		buf += done;
+-- 
+1.7.0.1
+




More information about the arch-commits mailing list