[ltp] [PATCH] tp-smapi for 2.6.24

Evgeni Golov linux-thinkpad@linux-thinkpad.org
Mon, 5 Nov 2007 15:50:50 +0100


This is a multi-part message in MIME format.

--Multipart=_Mon__5_Nov_2007_15_50_50_+0100_b+aRaFd+X10ro3WV
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hey guys,

since 2.6.24-rc1, tp-smapi (0.32) does not compile anymore.
This is caused by some stricter options-checking by the kernel Makefile.

Attached you find two patches. After applying these, tp-smapi should
compile fine again.

Have fun and comments welcome
Evgeni

--Multipart=_Mon__5_Nov_2007_15_50_50_+0100_b+aRaFd+X10ro3WV
Content-Type: text/x-diff;
 name="include-thinkpad_ec.h-directly.patch"
Content-Disposition: attachment;
 filename="include-thinkpad_ec.h-directly.patch"
Content-Transfer-Encoding: 7bit

diff -Nrwu tp_smapi-0.32.orig/hdaps.c tp_smapi-0.32/hdaps.c
--- tp_smapi-0.32.orig/hdaps.c	2007-07-28 05:29:52.000000000 +0200
+++ tp_smapi-0.32/hdaps.c	2007-11-02 20:26:41.000000000 +0100
@@ -34,7 +34,7 @@
 #include <linux/timer.h>
 #include <linux/dmi.h>
 #include <linux/jiffies.h>
-#include <linux/thinkpad_ec.h>
+#include "thinkpad_ec.h"
 #include <linux/pci_ids.h>
 
 /* Embedded controller accelerometer read command and its result: */
diff -Nrwu tp_smapi-0.32.orig/thinkpad_ec.c tp_smapi-0.32/thinkpad_ec.c
--- tp_smapi-0.32.orig/thinkpad_ec.c	2007-07-28 05:29:52.000000000 +0200
+++ tp_smapi-0.32/thinkpad_ec.c	2007-11-02 20:27:10.000000000 +0100
@@ -33,7 +33,7 @@
 #include <linux/dmi.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-#include <linux/thinkpad_ec.h>
+#include "thinkpad_ec.h"
 #include <linux/jiffies.h>
 #include <asm/semaphore.h>
 #include <asm/io.h>
diff -Nrwu tp_smapi-0.32.orig/tp_smapi.c tp_smapi-0.32/tp_smapi.c
--- tp_smapi-0.32.orig/tp_smapi.c	2007-07-28 05:29:52.000000000 +0200
+++ tp_smapi-0.32/tp_smapi.c	2007-11-02 20:27:27.000000000 +0100
@@ -36,7 +36,7 @@
 #include <linux/mc146818rtc.h>	/* CMOS defines */
 #include <linux/delay.h>
 #include <linux/version.h>
-#include <linux/thinkpad_ec.h>
+#include "thinkpad_ec.h"
 #include <linux/platform_device.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>

--Multipart=_Mon__5_Nov_2007_15_50_50_+0100_b+aRaFd+X10ro3WV
Content-Type: text/x-diff;
 name="Makefile-for-2.6.24.patch"
Content-Disposition: attachment;
 filename="Makefile-for-2.6.24.patch"
Content-Transfer-Encoding: 7bit

diff -Nrwu tp_smapi-0.32.orig/Makefile tp_smapi-0.32/Makefile
--- tp_smapi-0.32.orig/Makefile	2007-07-28 05:29:52.000000000 +0200
+++ tp_smapi-0.32/Makefile	2007-11-02 20:36:40.000000000 +0100
@@ -35,7 +36,7 @@
 
 # Build the modules thinkpad_ec.ko, tp_smapi.ko and (if HDAPS=1) hdaps.ko
 modules: $(KSRC) $(patsubst %.o,%.c,$(TP_MODULES))
-	$(MAKE) -C $(KSRC) M=$(PWD) O=$(KBUILD) modules
+	$(MAKE) -C $(KSRC) M=$(PWD) modules
 
 clean:
 	rm -f tp_smapi.mod.* tp_smapi.o tp_smapi.ko .tp_smapi.*.cmd
@@ -150,7 +151,7 @@
 #####################################################################
 # This part runs as a submake in kernel Makefile context:
 
-CFLAGS := $(CFLAGS) -I$(M)/include
+#CFLAGS := $(CFLAGS) -I$(M)/include
 obj-m  := $(TP_MODULES)
 
 endif

--Multipart=_Mon__5_Nov_2007_15_50_50_+0100_b+aRaFd+X10ro3WV--