diff options
author | 2011-05-25 20:05:17 -0500 | |
---|---|---|
committer | 2011-05-26 09:03:04 -0500 | |
commit | 50241131ba628cbf7a393e710cfae7c25a44cf49 (patch) | |
tree | 02fc1c758faa70e46e662075db688c655cbc38ef /app-laptop/tp_smapi/files | |
parent | openbabel: 2.3 is in the tree now. (diff) | |
download | dberkholz-50241131ba628cbf7a393e710cfae7c25a44cf49.tar.gz dberkholz-50241131ba628cbf7a393e710cfae7c25a44cf49.tar.bz2 dberkholz-50241131ba628cbf7a393e710cfae7c25a44cf49.zip |
tp_smapi: Whitelist X120e and T520 so thinkpad_ec will load.
Diffstat (limited to 'app-laptop/tp_smapi/files')
4 files changed, 61 insertions, 19 deletions
diff --git a/app-laptop/tp_smapi/files/0.33-remove-cdev.patch b/app-laptop/tp_smapi/files/0.33-remove-cdev.patch deleted file mode 100644 index 69445e6..0000000 --- a/app-laptop/tp_smapi/files/0.33-remove-cdev.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN tp_smapi-0.33.orig/hdaps.c tp_smapi-0.33/hdaps.c ---- tp_smapi-0.33.orig/hdaps.c 2008-03-12 00:42:20.000000000 -0700 -+++ tp_smapi-0.33/hdaps.c 2008-03-12 00:43:30.000000000 -0700 -@@ -827,7 +827,6 @@ - hdaps_idev->id.vendor = HDAPS_INPUT_VENDOR; - hdaps_idev->id.product = HDAPS_INPUT_PRODUCT; - hdaps_idev->id.version = HDAPS_INPUT_JS_VERSION; -- hdaps_idev->cdev.dev = &pdev->dev; - hdaps_idev->evbit[0] = BIT(EV_ABS); - hdaps_idev->open = hdaps_mousedev_open; - hdaps_idev->close = hdaps_mousedev_close; -@@ -847,7 +846,6 @@ - hdaps_idev_raw->id.vendor = HDAPS_INPUT_VENDOR; - hdaps_idev_raw->id.product = HDAPS_INPUT_PRODUCT; - hdaps_idev_raw->id.version = HDAPS_INPUT_RAW_VERSION; -- hdaps_idev_raw->cdev.dev = &pdev->dev; - hdaps_idev_raw->evbit[0] = BIT(EV_ABS); - hdaps_idev_raw->open = hdaps_mousedev_open; - hdaps_idev_raw->close = hdaps_mousedev_close; diff --git a/app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch b/app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch new file mode 100644 index 0000000..6e0c8d9 --- /dev/null +++ b/app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch @@ -0,0 +1,12 @@ +diff -ur tp_smapi-0.40.orig//thinkpad_ec.c tp_smapi-0.40//thinkpad_ec.c +--- tp_smapi-0.40.orig//thinkpad_ec.c 2011-05-25 20:01:04.623516726 -0500 ++++ tp_smapi-0.40//thinkpad_ec.c 2011-05-25 20:02:01.303273850 -0500 +@@ -456,6 +456,8 @@ + TP_DMI_MATCH("IBM", "ThinkPad A30"), + TP_DMI_MATCH("IBM", "ThinkPad T23"), + TP_DMI_MATCH("IBM", "ThinkPad X24"), ++ TP_DMI_MATCH("LENOVO", "ThinkPad X120e"), ++ TP_DMI_MATCH("LENOVO", "ThinkPad T520"), + { .ident = NULL } + }; + return dmi_find_substring(DMI_DEV_TYPE_OEM_STRING, diff --git a/app-laptop/tp_smapi/files/fix_header_check.patch b/app-laptop/tp_smapi/files/fix_header_check.patch new file mode 100644 index 0000000..97b6569 --- /dev/null +++ b/app-laptop/tp_smapi/files/fix_header_check.patch @@ -0,0 +1,19 @@ +*** Makefile.orig Mon Nov 23 08:55:42 2009 +--- Makefile Mon Nov 23 08:57:48 2009 +*************** +*** 27,33 **** + + DEBUG := 0 + +! ifneq ($(shell [ -f $(KBUILD)/include/linux/aio_abi.h ] && echo 1),1) + $(warning Building tp_smapi requires Linux kernel 2.6.19 or newer, and matching kernel headers.) + $(warning You may need to override the following Make variables:) + $(warning . KVER=$(KVER)) +--- 27,33 ---- + + DEBUG := 0 + +! ifneq ($(shell [ -f $(KSRC)/include/linux/aio_abi.h ] && echo 1),1) + $(warning Building tp_smapi requires Linux kernel 2.6.19 or newer, and matching kernel headers.) + $(warning You may need to override the following Make variables:) + $(warning . KVER=$(KVER)) diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch b/app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch new file mode 100644 index 0000000..60f0599 --- /dev/null +++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch @@ -0,0 +1,30 @@ +diff -urN tp_smapi-0.40.orig/thinkpad_ec.c tp_smapi-0.40/thinkpad_ec.c +--- tp_smapi-0.40.orig/thinkpad_ec.c 2008-12-16 08:03:06.000000000 +0300 ++++ tp_smapi-0.40/thinkpad_ec.c 2010-11-22 18:16:54.000000000 +0300 +@@ -88,7 +88,11 @@ + #define TPC_PREFETCH_JUNK (INITIAL_JIFFIES+1) /* Ignore prefetch */ + + /* Locking: */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) + static DECLARE_MUTEX(thinkpad_ec_mutex); ++#else ++static DEFINE_SEMAPHORE(thinkpad_ec_mutex); ++#endif + + /* Kludge in case the ACPI DSDT reserves the ports we need. */ + static int force_io; /* Willing to do IO to ports we couldn't reserve? */ +diff -urN tp_smapi-0.40.orig/tp_smapi.c tp_smapi-0.40/tp_smapi.c +--- tp_smapi-0.40.orig/tp_smapi.c 2008-12-16 08:03:06.000000000 +0300 ++++ tp_smapi-0.40/tp_smapi.c 2010-11-22 18:17:29.000000000 +0300 +@@ -109,7 +109,11 @@ + #define SMAPI_PORT2 0x4F /* fixed port, meaning unclear */ + static unsigned short smapi_port; /* APM control port, normally 0xB2 */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) + static DECLARE_MUTEX(smapi_mutex); ++#else ++static DEFINE_SEMAPHORE(smapi_mutex); ++#endif + + /** + * find_smapi_port - read SMAPI port from NVRAM |