This commit is contained in:
parent
16b1e45b23
commit
2de2a671d1
133
lirc-kernel-2.6.26-fixes.patch
Normal file
133
lirc-kernel-2.6.26-fixes.patch
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
--- lirc/drivers/lirc_dev/lirc_dev.c 2008/01/13 10:45:02 1.56
|
||||||
|
+++ lirc/drivers/lirc_dev/lirc_dev.c 2008/08/12 20:50:39 1.59
|
||||||
|
@@ -49,7 +49,11 @@
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#endif
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
|
||||||
|
#include <asm/semaphore.h>
|
||||||
|
+#else
|
||||||
|
+#include <linux/semaphore.h>
|
||||||
|
+#endif
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
|
||||||
|
#include <linux/wrapper.h>
|
||||||
|
#endif
|
||||||
|
@@ -145,7 +149,8 @@
|
||||||
|
#ifdef LIRC_HAVE_DEVFS_26
|
||||||
|
devfs_remove(DEV_LIRC "/%u", ir->p.minor);
|
||||||
|
#endif
|
||||||
|
- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
|
||||||
|
+ lirc_device_destroy(lirc_class,
|
||||||
|
+ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
|
||||||
|
|
||||||
|
if (ir->buf != ir->p.rbuf) {
|
||||||
|
lirc_buffer_free(ir->buf);
|
||||||
|
@@ -400,9 +405,9 @@
|
||||||
|
S_IFCHR|S_IRUSR|S_IWUSR,
|
||||||
|
DEV_LIRC "/%u", ir->p.minor);
|
||||||
|
#endif
|
||||||
|
- (void) lirc_class_device_create(lirc_class, NULL,
|
||||||
|
- MKDEV(IRCTL_DEV_MAJOR, ir->p.minor),
|
||||||
|
- ir->p.dev, "lirc%u", ir->p.minor);
|
||||||
|
+ (void) lirc_device_create(lirc_class, ir->p.dev,
|
||||||
|
+ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor),
|
||||||
|
+ "lirc%u", ir->p.minor);
|
||||||
|
|
||||||
|
if (p->sample_rate || p->get_queue) {
|
||||||
|
/* try to fire up polling thread */
|
||||||
|
@@ -441,7 +446,8 @@
|
||||||
|
return minor;
|
||||||
|
|
||||||
|
out_sysfs:
|
||||||
|
- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
|
||||||
|
+ lirc_device_destroy(lirc_class,
|
||||||
|
+ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
|
||||||
|
#ifdef LIRC_HAVE_DEVFS_24
|
||||||
|
devfs_unregister(ir->devfs_handle);
|
||||||
|
#endif
|
||||||
|
--- lirc/drivers/kcompat.h 2008/01/13 10:26:28 5.34
|
||||||
|
+++ lirc/drivers/kcompat.h 2008/05/14 16:37:49 5.36
|
||||||
|
@@ -36,10 +36,10 @@
|
||||||
|
class_simple_destroy(cls);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \
|
||||||
|
- class_simple_device_add(cs, dev, device, fmt, ## args)
|
||||||
|
+#define lirc_device_create(cs, parent, dev, fmt, args...) \
|
||||||
|
+ class_simple_device_add(cs, dev, parent, fmt, ## args)
|
||||||
|
|
||||||
|
-static inline void class_device_destroy(lirc_class_t *cls, dev_t devt)
|
||||||
|
+static inline void lirc_device_destroy(lirc_class_t *cls, dev_t devt)
|
||||||
|
{
|
||||||
|
class_simple_device_remove(devt);
|
||||||
|
}
|
||||||
|
@@ -48,20 +48,40 @@
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)
|
||||||
|
|
||||||
|
-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \
|
||||||
|
- class_device_create(cs, dev, device, fmt, ## args)
|
||||||
|
+#define lirc_device_create(cs, parent, dev, fmt, args...) \
|
||||||
|
+ class_device_create(cs, dev, parent, fmt, ## args)
|
||||||
|
|
||||||
|
#else /* >= 2.6.15 */
|
||||||
|
|
||||||
|
-#define lirc_class_device_create class_device_create
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
|
||||||
|
+
|
||||||
|
+#define lirc_device_create(cs, parent, dev, fmt, args...) \
|
||||||
|
+ class_device_create(cs, NULL, dev, parent, fmt, ## args)
|
||||||
|
+
|
||||||
|
+#else /* >= 2.6.26 */
|
||||||
|
+
|
||||||
|
+#define lirc_device_create device_create
|
||||||
|
+
|
||||||
|
+#endif /* >= 2.6.26 */
|
||||||
|
+
|
||||||
|
#define LIRC_DEVFS_PREFIX
|
||||||
|
|
||||||
|
-#endif
|
||||||
|
+#endif /* >= 2.6.15 */
|
||||||
|
|
||||||
|
typedef struct class lirc_class_t;
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
|
||||||
|
+
|
||||||
|
+#define lirc_device_destroy class_device_destroy
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
+#define lirc_device_destroy device_destroy
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#endif /* >= 2.6.13 */
|
||||||
|
+
|
||||||
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
|
||||||
|
#define LIRC_HAVE_DEVFS
|
||||||
|
#define LIRC_HAVE_DEVFS_24
|
||||||
|
@@ -133,8 +153,8 @@
|
||||||
|
#ifndef LIRC_HAVE_SYSFS
|
||||||
|
#define class_destroy(x) do { } while (0)
|
||||||
|
#define class_create(x, y) NULL
|
||||||
|
-#define class_device_destroy(x, y) do { } while (0)
|
||||||
|
-#define lirc_class_device_create(x, y, z, xx, yy, zz) 0
|
||||||
|
+#define lirc_class_destroy(x, y) do { } while (0)
|
||||||
|
+#define lirc_class_create(x, y, z, xx, yy, zz) 0
|
||||||
|
#define IS_ERR(x) 0
|
||||||
|
typedef struct class_simple
|
||||||
|
{
|
||||||
|
--- lirc/drivers/lirc_i2c/lirc_i2c.c 2008/08/31 23:45:56 1.1
|
||||||
|
+++ lirc/drivers/lirc_i2c/lirc_i2c.c 2008/08/31 23:46:36
|
||||||
|
@@ -54,7 +54,11 @@
|
||||||
|
#include <linux/i2c.h>
|
||||||
|
#include <linux/i2c-algo-bit.h>
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
|
||||||
|
#include <asm/semaphore.h>
|
||||||
|
+#else
|
||||||
|
+#include <linux/semaphore.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include "drivers/kcompat.h"
|
||||||
|
#include "drivers/lirc_dev/lirc_dev.h"
|
12
lirc-kernel-2.6.27-fixes.patch
Normal file
12
lirc-kernel-2.6.27-fixes.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- lirc-0.8.3/drivers/kcompat.h 2008/09/01 00:02:20 1.5
|
||||||
|
+++ lirc-0.8.3/drivers/kcompat.h 2008/09/01 00:15:39
|
||||||
|
@@ -60,7 +60,8 @@
|
||||||
|
|
||||||
|
#else /* >= 2.6.26 */
|
||||||
|
|
||||||
|
-#define lirc_device_create device_create
|
||||||
|
+#define lirc_device_create(cs, parent, dev, fmt, args...) \
|
||||||
|
+ device_create_drvdata(cs, parent, dev, NULL, fmt, ## args)
|
||||||
|
|
||||||
|
#endif /* >= 2.6.26 */
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 1 02:20:04 CEST 2008 - ro@suse.de
|
||||||
|
|
||||||
|
- pick some fixes from cvs to compile with 2.6.26
|
||||||
|
- hack to build with 2.6.27
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 5 16:52:22 CEST 2008 - lnussel@suse.de
|
Mon May 5 16:52:22 CEST 2008 - lnussel@suse.de
|
||||||
|
|
||||||
|
@ -25,13 +25,17 @@ License: GPL v2 or later
|
|||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
Summary: LIRC kernel modules
|
Summary: LIRC kernel modules
|
||||||
Version: 0.8.3
|
Version: 0.8.3
|
||||||
Release: 4
|
Release: 5
|
||||||
Source0: lirc-%{version}.tar.bz2
|
Source0: lirc-%{version}.tar.bz2
|
||||||
Source1: Makefile.module
|
Source1: Makefile.module
|
||||||
Source2: Makefile.modsub
|
Source2: Makefile.modsub
|
||||||
Patch: lirc-0.8.1-kernel_SLAB_ATOMIC.diff
|
Patch: lirc-0.8.1-kernel_SLAB_ATOMIC.diff
|
||||||
# http://brakemeier.de/electronics/vdr/lirc-imon.html
|
# http://brakemeier.de/electronics/vdr/lirc-imon.html
|
||||||
Patch1: lirc-0.8.3pre1-imon-pad2keys.patch
|
Patch1: lirc-0.8.3pre1-imon-pad2keys.patch
|
||||||
|
# picked from CVS
|
||||||
|
Patch2: lirc-kernel-2.6.26-fixes.patch
|
||||||
|
# hack to build
|
||||||
|
Patch3: lirc-kernel-2.6.27-fixes.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%suse_kernel_module_package -n lirc kdump um debug
|
%suse_kernel_module_package -n lirc kdump um debug
|
||||||
|
|
||||||
@ -87,6 +91,8 @@ mv lirc_imon2/lirc_imon.c lirc_imon2/lirc_imon2.c
|
|||||||
popd
|
popd
|
||||||
#%patch -p1
|
#%patch -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
./configure --with-driver=all
|
./configure --with-driver=all
|
||||||
cp -a drivers source
|
cp -a drivers source
|
||||||
@ -116,6 +122,9 @@ for flavor in %flavors_to_build; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 01 2008 ro@suse.de
|
||||||
|
- pick some fixes from cvs to compile with 2.6.26
|
||||||
|
- hack to build with 2.6.27
|
||||||
* Mon May 05 2008 lnussel@suse.de
|
* Mon May 05 2008 lnussel@suse.de
|
||||||
- new version 0.8.3
|
- new version 0.8.3
|
||||||
* added support for Samsung USB IR Receiver (Robert Schedel)
|
* added support for Samsung USB IR Receiver (Robert Schedel)
|
||||||
|
@ -42,7 +42,7 @@ License: GPL v2 or later
|
|||||||
Group: Hardware/Other
|
Group: Hardware/Other
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 0.8.3
|
Version: 0.8.3
|
||||||
Release: 28
|
Release: 34
|
||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
Summary: Tools for Infrared Receivers
|
Summary: Tools for Infrared Receivers
|
||||||
Source0: lirc-0.8.3.tar.bz2
|
Source0: lirc-0.8.3.tar.bz2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user