SOURCES: lmpcm_usb-kernel_compatibility.patch (NEW) - for kernels < 2.6.24

charles charles at pld-linux.org
Tue May 13 14:57:50 CEST 2008


Author: charles                      Date: Tue May 13 12:57:50 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- for kernels < 2.6.24

---- Files affected:
SOURCES:
   lmpcm_usb-kernel_compatibility.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/lmpcm_usb-kernel_compatibility.patch
diff -u /dev/null SOURCES/lmpcm_usb-kernel_compatibility.patch:1.1
--- /dev/null	Tue May 13 14:57:50 2008
+++ SOURCES/lmpcm_usb-kernel_compatibility.patch	Tue May 13 14:57:44 2008
@@ -0,0 +1,46 @@
+--- lmpcm_usb-0.5.6/lmpcm_usb.c.orig	2008-05-13 13:07:29.000000000 +0200
++++ lmpcm_usb-0.5.6/lmpcm_usb.c	2008-05-13 13:17:35.881689269 +0200
+@@ -30,7 +30,7 @@
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/usb.h>
+-
++#include <linux/version.h>
+ 
+ #define DRIVER_VERSION	"v0.5.6"
+ #define DRIVER_AUTHOR	"David Oliveira <d.oliveira at prozone.org>"
+@@ -271,19 +271,31 @@
+ 	for ( x = 0 ; keys[x] ; x++ )
+ 		set_bit(keys[x],inputdev->keybit);
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
++
+ 	// Add basic buttons
+ 
+-	inputdev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) |
+-					    BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
++	inputdev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) |
++					    BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ 
+ 	// Add move mouse movement (X/Y)
+ 
+-	inputdev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
++	inputdev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
+ 
+ 	// Add wheel
+ 
++	inputdev->relbit[0] |= BIT(REL_WHEEL);
++
++#else
++
++	inputdev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) |
++					    BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
++
++	inputdev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
++
+ 	inputdev->relbit[0] |= BIT_MASK(REL_WHEEL);
+ 
++#endif
+ 
+ 	// Private data structure
+ 
================================================================


More information about the pld-cvs-commit mailing list