diff options
author | Antonio Hernández Blas <hba.nihilismus@gmail.com> | 2011-05-10 11:02:51 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-05-10 11:02:51 -0500 |
commit | a2ecab12c1ff62b13b456198191d8e315e4e88e3 (patch) | |
tree | c258b6f435ce60b2c0f1af62b6f5aa1f40aefb22 /system/tp_smapi/patches | |
parent | 854968f642c9363b03bc429d9479849d5a5b1f18 (diff) |
system/tp_smapi: Added (SMAPI BIOS access for ThinkPad Laptops)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/tp_smapi/patches')
-rw-r--r-- | system/tp_smapi/patches/tp_smapi-0.40-2.6.37.patch | 30 | ||||
-rw-r--r-- | system/tp_smapi/patches/tp_smapi-0.40-x200-x200s-support.patch | 11 |
2 files changed, 41 insertions, 0 deletions
diff --git a/system/tp_smapi/patches/tp_smapi-0.40-2.6.37.patch b/system/tp_smapi/patches/tp_smapi-0.40-2.6.37.patch new file mode 100644 index 0000000000..60f05997a1 --- /dev/null +++ b/system/tp_smapi/patches/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 diff --git a/system/tp_smapi/patches/tp_smapi-0.40-x200-x200s-support.patch b/system/tp_smapi/patches/tp_smapi-0.40-x200-x200s-support.patch new file mode 100644 index 0000000000..b1c4fa5c1a --- /dev/null +++ b/system/tp_smapi/patches/tp_smapi-0.40-x200-x200s-support.patch @@ -0,0 +1,11 @@ +--- a/hdaps.c ++++ b/hdaps.c +@@ -750,6 +750,8 @@ + HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60s", HDAPS_ORIENT_INVERT_Y), + HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X), + HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X), ++ HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X200", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_XY), ++ HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X200s", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_XY), + { .ident = NULL } + }; + |