Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kernel2633.git;a=commitdiff;h=84f057089ca8416576c701c7fd47b9444972fe1a

commit 84f057089ca8416576c701c7fd47b9444972fe1a
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Fri Mar 12 22:04:44 2010 +0100

lirc-0.8.6-9-i686

- add kernel-2.6.33.patch

diff --git a/source/apps-extra/lirc/FrugalBuild 
b/source/apps-extra/lirc/FrugalBuild
index 8c91a1e..87d6658 100644
--- a/source/apps-extra/lirc/FrugalBuild
+++ b/source/apps-extra/lirc/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=lirc
pkgver=0.8.6
-pkgrel=8
+pkgrel=9
pkgdesc="LIRC is a package that allows you to decode and send infra-red signals 
of many commonly used remote controls."
url="http://www.lirc.org/";
Finclude kernel-module sourceforge
@@ -20,7 +20,15 @@ rodepends=("lirc_modules=$pkgver liblirc=$pkgver")
groups=('apps-extra')
archs=('i686' 'x86_64')
backup=(etc/lirc{d,md}.conf etc/sysconfig/lirc)
-source=(${sour...@]} rc.lirc lirc.logrotate lirc.sysconfig README.Frugalware 
kernel-2.6.32.patch)
+source=(${sour...@]} rc.lirc lirc.logrotate lirc.sysconfig README.Frugalware 
kernel-2.6.32.patch \
+       kernel-2.6.33.patch)
+sha1sums=('236cdbb1e03181d1fb1c5c1d0f85cec1ffa0665b' \
+          '30a7d32e512af135840e657edfa0736ad9d53281' \
+          '4342b004eb53d51fcbb9af2cf136bb4990874608' \
+          '504e0cd04780e75b6a8ab6836815c1ed9058db78' \
+          '0b80c73e902920c028dca98a9006aaa313c6e120' \
+          '81d1673cb4fc1e2cb9261c623c86aafe0b7a5322' \
+          '9e48e21c68db0fbaad037ad8ca3c1d252430158e')
unset install

build() {
@@ -52,11 +60,5 @@ build() {
Fbuild_kernelmod_scriptlet
Fsplit liblirc usr/{include,lib}
}
-sha1sums=('236cdbb1e03181d1fb1c5c1d0f85cec1ffa0665b' \
-          '30a7d32e512af135840e657edfa0736ad9d53281' \
-          '4342b004eb53d51fcbb9af2cf136bb4990874608' \
-          '504e0cd04780e75b6a8ab6836815c1ed9058db78' \
-          '0b80c73e902920c028dca98a9006aaa313c6e120' \
-          '81d1673cb4fc1e2cb9261c623c86aafe0b7a5322')

# optimization OK
diff --git a/source/apps-extra/lirc/kernel-2.6.33.patch 
b/source/apps-extra/lirc/kernel-2.6.33.patch
new file mode 100644
index 0000000..fc0c21e
--- /dev/null
+++ b/source/apps-extra/lirc/kernel-2.6.33.patch
@@ -0,0 +1,438 @@
+diff --git a/drivers/lirc_atiusb/lirc_atiusb.c 
b/drivers/lirc_atiusb/lirc_atiusb.c
+index bfb3873..b0fe76f 100644
+--- a/drivers/lirc_atiusb/lirc_atiusb.c
++++ b/drivers/lirc_atiusb/lirc_atiusb.c
+@@ -43,7 +43,7 @@
+ #error "*******************************************************"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+
+ #include <linux/kernel.h>
+ #include <linux/errno.h>
+diff --git a/drivers/lirc_bt829/lirc_bt829.c b/drivers/lirc_bt829/lirc_bt829.c
+index 4cd651f..6d68f2e 100644
+--- a/drivers/lirc_bt829/lirc_bt829.c
++++ b/drivers/lirc_bt829/lirc_bt829.c
+@@ -22,7 +22,7 @@
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
+ #error "This driver needs kernel version 2.4.0 or higher"
+ #endif
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/threads.h>
+diff --git a/drivers/lirc_dev/lirc_dev.c b/drivers/lirc_dev/lirc_dev.c
+index 67cd87a..cce671d 100644
+--- a/drivers/lirc_dev/lirc_dev.c
++++ b/drivers/lirc_dev/lirc_dev.c
+@@ -32,7 +32,7 @@
+ #error "**********************************************************"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/sched.h>
+diff --git a/drivers/lirc_dev/lirc_dev.h b/drivers/lirc_dev/lirc_dev.h
+index 87f18e5..c6aeebf 100644
+--- a/drivers/lirc_dev/lirc_dev.h
++++ b/drivers/lirc_dev/lirc_dev.h
+@@ -30,221 +30,101 @@
+
+ struct lirc_buffer {
+       wait_queue_head_t wait_poll;
+-      spinlock_t lock;
++      spinlock_t fifo_lock;
+       unsigned int chunk_size;
+       unsigned int size; /* in chunks */
+       /* Using chunks instead of bytes pretends to simplify boundary checking
+        * And should allow for some performance fine tunning later */
+-#ifdef LIRC_HAVE_KFIFO
+-      struct kfifo *fifo;
+-#else
+-      unsigned int fill; /* in chunks */
+-      int head, tail;    /* in chunks */
+-      unsigned char *data;
+-#endif
++      struct kfifo fifo;
++      u8 fifo_initialized;
+ };
+-#ifndef LIRC_HAVE_KFIFO
+-static inline void lirc_buffer_lock(struct lirc_buffer *buf,
+-                                  unsigned long *flags)
+-{
+-      spin_lock_irqsave(&buf->lock, *flags);
+-}
+-static inline void lirc_buffer_unlock(struct lirc_buffer *buf,
+-                                    unsigned long *flags)
+-{
+-      spin_unlock_irqrestore(&buf->lock, *flags);
+-}
+-static inline void _lirc_buffer_clear(struct lirc_buffer *buf)
+-{
+-      buf->head = 0;
+-      buf->tail = 0;
+-      buf->fill = 0;
+-}
+-#endif
+ static inline void lirc_buffer_clear(struct lirc_buffer *buf)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      if (buf->fifo)
+-              kfifo_reset(buf->fifo);
+-#else
+       unsigned long flags;
+-      lirc_buffer_lock(buf, &flags);
+-      _lirc_buffer_clear(buf);
+-      lirc_buffer_unlock(buf, &flags);
+-#endif
++
++      if (buf->fifo_initialized) {
++              spin_lock_irqsave(&buf->fifo_lock, flags);
++              kfifo_reset(&buf->fifo);
++              spin_unlock_irqrestore(&buf->fifo_lock, flags);
++      } else
++              WARN(1, "calling %s on an uninitialized lirc_buffer\n", 
__func__);
+ }
+ static inline int lirc_buffer_init(struct lirc_buffer *buf,
+                                   unsigned int chunk_size,
+                                   unsigned int size)
+ {
++      int ret;
++
+       init_waitqueue_head(&buf->wait_poll);
+-      spin_lock_init(&buf->lock);
+-#ifndef LIRC_HAVE_KFIFO
+-      _lirc_buffer_clear(buf);
+-#endif
++      spin_lock_init(&buf->fifo_lock);
+       buf->chunk_size = chunk_size;
+       buf->size = size;
+-#ifdef LIRC_HAVE_KFIFO
+-      buf->fifo = kfifo_alloc(size*chunk_size, GFP_KERNEL, &buf->lock);
+-      if (!buf->fifo)
+-              return -ENOMEM;
+-#else
+-      buf->data = kmalloc(size*chunk_size, GFP_KERNEL);
+-      if (buf->data == NULL)
+-              return -ENOMEM;
+-      memset(buf->data, 0, size*chunk_size);
+-#endif
+-      return 0;
++      ret = kfifo_alloc(&buf->fifo, size * chunk_size, GFP_KERNEL);
++      if (ret == 0)
++              buf->fifo_initialized = 1;
++      return ret;
+ }
+ static inline void lirc_buffer_free(struct lirc_buffer *buf)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      if (buf->fifo)
+-              kfifo_free(buf->fifo);
+-#else
+-      kfree(buf->data);
+-      buf->data = NULL;
+-      buf->head = 0;
+-      buf->tail = 0;
+-      buf->fill = 0;
+-      buf->chunk_size = 0;
+-      buf->size = 0;
+-#endif
++      if (buf->fifo_initialized) {
++              kfifo_free(&buf->fifo);
++              buf->fifo_initialized = 0;
++      } else
++              WARN(1, "calling %s on an uninitialized lirc_buffer\n", 
__func__);
+ }
+-#ifndef LIRC_HAVE_KFIFO
+-static inline int  _lirc_buffer_full(struct lirc_buffer *buf)
++static inline int lirc_buffer_len(struct lirc_buffer *buf)
+ {
+-      return (buf->fill >= buf->size);
+-}
+-#endif
+-static inline int  lirc_buffer_full(struct lirc_buffer *buf)
+-{
+-#ifdef LIRC_HAVE_KFIFO
+-      return kfifo_len(buf->fifo) == buf->size * buf->chunk_size;
+-#else
++      int len;
+       unsigned long flags;
+-      int ret;
+-      lirc_buffer_lock(buf, &flags);
+-      ret = _lirc_buffer_full(buf);
+-      lirc_buffer_unlock(buf, &flags);
+-      return ret;
+-#endif
++
++      spin_lock_irqsave(&buf->fifo_lock, flags);
++      len = kfifo_len(&buf->fifo);
++      spin_unlock_irqrestore(&buf->fifo_lock, flags);
++
++      return len;
+ }
+-#ifndef LIRC_HAVE_KFIFO
+-static inline int  _lirc_buffer_empty(struct lirc_buffer *buf)
++
++static inline int  lirc_buffer_full(struct lirc_buffer *buf)
+ {
+-      return !(buf->fill);
++      return lirc_buffer_len(buf) == buf->size * buf->chunk_size;
+ }
+-#endif
+ static inline int  lirc_buffer_empty(struct lirc_buffer *buf)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      return !kfifo_len(buf->fifo);
+-#else
+-      unsigned long flags;
+-      int ret;
+-      lirc_buffer_lock(buf, &flags);
+-      ret = _lirc_buffer_empty(buf);
+-      lirc_buffer_unlock(buf, &flags);
+-      return ret;
+-#endif
++      return !lirc_buffer_len(buf);
+ }
+-#ifndef LIRC_HAVE_KFIFO
+-static inline int  _lirc_buffer_available(struct lirc_buffer *buf)
+-{
+-      return (buf->size - buf->fill);
+-}
+-#endif
+ static inline int  lirc_buffer_available(struct lirc_buffer *buf)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      return buf->size - (kfifo_len(buf->fifo) / buf->chunk_size);
+-#else
+-      unsigned long flags;
+-      int ret;
+-      lirc_buffer_lock(buf, &flags);
+-      ret = _lirc_buffer_available(buf);
+-      lirc_buffer_unlock(buf, &flags);
+-      return ret;
+-#endif
+-}
+-#ifndef LIRC_HAVE_KFIFO
+-static inline void _lirc_buffer_read_1(struct lirc_buffer *buf,
+-                                     unsigned char *dest)
+-{
+-      memcpy(dest, &buf->data[buf->head*buf->chunk_size], buf->chunk_size);
+-      buf->head = mod(buf->head+1, buf->size);
+-      buf->fill -= 1;
++      return buf->size - (lirc_buffer_len(buf) / buf->chunk_size);
+ }
+-#endif
+-static inline void lirc_buffer_read(struct lirc_buffer *buf,
++static inline unsigned int lirc_buffer_read(struct lirc_buffer *buf,
+                                   unsigned char *dest)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      if (kfifo_len(buf->fifo) >= buf->chunk_size)
+-              kfifo_get(buf->fifo, dest, buf->chunk_size);
+-#else
+-      unsigned long flags;
+-      lirc_buffer_lock(buf, &flags);
+-      _lirc_buffer_read_1(buf, dest);
+-      lirc_buffer_unlock(buf, &flags);
+-#endif
+-}
+-#ifndef LIRC_HAVE_KFIFO
+-static inline void _lirc_buffer_write_1(struct lirc_buffer *buf,
+-                                    unsigned char *orig)
+-{
+-      memcpy(&buf->data[buf->tail*buf->chunk_size], orig, buf->chunk_size);
+-      buf->tail = mod(buf->tail+1, buf->size);
+-      buf->fill++;
++      unsigned int ret = 0;
++
++      if (lirc_buffer_len(buf) >= buf->chunk_size)
++              ret = kfifo_out_locked(&buf->fifo, dest, buf->chunk_size,
++                                    &buf->fifo_lock);
++      return ret;
+ }
+-#endif
+-static inline void lirc_buffer_write(struct lirc_buffer *buf,
++static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf,
+                                    unsigned char *orig)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      kfifo_put(buf->fifo, orig, buf->chunk_size);
+-#else
+-      unsigned long flags;
+-      lirc_buffer_lock(buf, &flags);
+-      _lirc_buffer_write_1(buf, orig);
+-      lirc_buffer_unlock(buf, &flags);
+-#endif
+-}
+-#ifndef LIRC_HAVE_KFIFO
+-static inline void _lirc_buffer_write_n(struct lirc_buffer *buf,
+-                                      unsigned char *orig, int count)
+-{
+-      int space1;
+-      if (buf->head > buf->tail)
+-              space1 = buf->head - buf->tail;
+-      else
+-              space1 = buf->size - buf->tail;
++      unsigned int ret;
++
++      ret = kfifo_in_locked(&buf->fifo, orig, buf->chunk_size,
++                              &buf->fifo_lock);
+
+-      if (count > space1) {
+-              memcpy(&buf->data[buf->tail * buf->chunk_size], orig,
+-                     space1 * buf->chunk_size);
+-              memcpy(&buf->data[0], orig + (space1 * buf->chunk_size),
+-                     (count - space1) * buf->chunk_size);
+-      } else {
+-              memcpy(&buf->data[buf->tail * buf->chunk_size], orig,
+-                     count * buf->chunk_size);
+-      }
+-      buf->tail = mod(buf->tail + count, buf->size);
+-      buf->fill += count;
++      return ret;
+ }
+-#endif
+-static inline void lirc_buffer_write_n(struct lirc_buffer *buf,
+-                                     unsigned char *orig, int count)
++static inline unsigned int lirc_buffer_write_n(struct lirc_buffer *buf,
++                                       unsigned char *orig, int count)
+ {
+-#ifdef LIRC_HAVE_KFIFO
+-      kfifo_put(buf->fifo, orig, count * buf->chunk_size);
+-#else
+-      unsigned long flags;
+-      lirc_buffer_lock(buf, &flags);
+-      _lirc_buffer_write_n(buf, orig, count);
+-      lirc_buffer_unlock(buf, &flags);
+-#endif
++      unsigned int ret;
++
++      ret = kfifo_in_locked(&buf->fifo, orig, count * buf->chunk_size,
++                              &buf->fifo_lock);
++
++      return ret;
+ }
+
+ struct lirc_driver {
+diff --git a/drivers/lirc_igorplugusb/lirc_igorplugusb.c 
b/drivers/lirc_igorplugusb/lirc_igorplugusb.c
+index ed4ae50..02c14a3 100644
+--- a/drivers/lirc_igorplugusb/lirc_igorplugusb.c
++++ b/drivers/lirc_igorplugusb/lirc_igorplugusb.c
+@@ -47,7 +47,7 @@
+ #error "*******************************************************"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/kmod.h>
+diff --git a/drivers/lirc_imon/lirc_imon.c b/drivers/lirc_imon/lirc_imon.c
+index c98c712..d23b916 100644
+--- a/drivers/lirc_imon/lirc_imon.c
++++ b/drivers/lirc_imon/lirc_imon.c
+@@ -30,7 +30,7 @@
+ #error "*** Sorry, this driver requires a 2.6 kernel"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+
+ #include <linux/errno.h>
+ #include <linux/init.h>
+diff --git a/drivers/lirc_it87/lirc_it87.c b/drivers/lirc_it87/lirc_it87.c
+index defef9e..1d17d95 100644
+--- a/drivers/lirc_it87/lirc_it87.c
++++ b/drivers/lirc_it87/lirc_it87.c
+@@ -36,7 +36,7 @@
+
+ #include <linux/version.h>
+ #include <linux/module.h>
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #include <linux/sched.h>
+ #include <linux/errno.h>
+ #include <linux/signal.h>
+diff --git a/drivers/lirc_mceusb/lirc_mceusb.c 
b/drivers/lirc_mceusb/lirc_mceusb.c
+index abcd566..3611646 100644
+--- a/drivers/lirc_mceusb/lirc_mceusb.c
++++ b/drivers/lirc_mceusb/lirc_mceusb.c
+@@ -52,7 +52,7 @@
+ #error "Sorry, this driver needs kernel version 2.6.5 or higher"
+ #error "*******************************************************"
+ #endif
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #include <linux/kernel.h>
+ #include <linux/errno.h>
+ #include <linux/init.h>
+diff --git a/drivers/lirc_sasem/lirc_sasem.c b/drivers/lirc_sasem/lirc_sasem.c
+index dc7f5fb..f8125ed 100644
+--- a/drivers/lirc_sasem/lirc_sasem.c
++++ b/drivers/lirc_sasem/lirc_sasem.c
+@@ -41,7 +41,7 @@
+ #error "*** Sorry, this driver requires kernel version 2.4.22 or higher"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+
+ #include <linux/errno.h>
+ #include <linux/init.h>
+diff --git a/drivers/lirc_serial/lirc_serial.c 
b/drivers/lirc_serial/lirc_serial.c
+index d25d20a..f7e3143 100644
+--- a/drivers/lirc_serial/lirc_serial.c
++++ b/drivers/lirc_serial/lirc_serial.c
+@@ -60,7 +60,7 @@
+ #error "**********************************************************"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+
+ #if defined(CONFIG_SERIAL) || defined(CONFIG_SERIAL_8250)
+ #warning "******************************************"
+diff --git a/drivers/lirc_sir/lirc_sir.c b/drivers/lirc_sir/lirc_sir.c
+index 7778196..ac23bb8 100644
+--- a/drivers/lirc_sir/lirc_sir.c
++++ b/drivers/lirc_sir/lirc_sir.c
+@@ -45,7 +45,7 @@
+ # include <config.h>
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #if !defined(CONFIG_SERIAL_MODULE)
+ #if !defined(LIRC_ON_SA1100)
+ #warning "******************************************"
+diff --git a/drivers/lirc_streamzap/lirc_streamzap.c 
b/drivers/lirc_streamzap/lirc_streamzap.c
+index e3b19cf..4ad2321 100755
+--- a/drivers/lirc_streamzap/lirc_streamzap.c
++++ b/drivers/lirc_streamzap/lirc_streamzap.c
+@@ -35,7 +35,7 @@
+ #error "Sorry, this driver needs kernel version 2.4.0 or higher"
+ #error "*******************************************************"
+ #endif
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+ #include <linux/kernel.h>
+ #include <linux/errno.h>
+ #include <linux/init.h>
+diff --git a/drivers/lirc_wpc8769l/lirc_wpc8769l.c 
b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
+index 6a2a52f..70532a3 100644
+--- a/drivers/lirc_wpc8769l/lirc_wpc8769l.c
++++ b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
+@@ -37,7 +37,7 @@
+ #error "**********************************************************"
+ #endif
+
+-#include <linux/autoconf.h>
++#include <generated/autoconf.h>
+
+ #include <linux/module.h>
+ #include <linux/errno.h>
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to