diff options
Diffstat (limited to 'system/tp_smapi/patches/tp_smapi-0.40-2.6.37.patch')
-rw-r--r-- | system/tp_smapi/patches/tp_smapi-0.40-2.6.37.patch | 30 |
1 files changed, 30 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 |