aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2011-05-25 20:05:17 -0500
committerDonnie Berkholz <dberkholz@gentoo.org>2011-05-26 09:03:04 -0500
commit50241131ba628cbf7a393e710cfae7c25a44cf49 (patch)
tree02fc1c758faa70e46e662075db688c655cbc38ef /app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch
parentopenbabel: 2.3 is in the tree now. (diff)
downloaddberkholz-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/tp_smapi-0.40-2.6.37.patch')
-rw-r--r--app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch30
1 files changed, 30 insertions, 0 deletions
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