1 # from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602367
2 diff --git a/thinkpad_ec.c b/thinkpad_ec.c
5 @@ -88,7 +88,11 @@ static u64 prefetch_jiffies;
6 #define TPC_PREFETCH_JUNK (INITIAL_JIFFIES+1) /* Ignore prefetch */
9 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
10 static DECLARE_MUTEX(thinkpad_ec_mutex);
12 +static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
15 /* Kludge in case the ACPI DSDT reserves the ports we need. */
16 static int force_io; /* Willing to do IO to ports we couldn't reserve? */
17 diff --git a/tp_smapi.c b/tp_smapi.c
20 @@ -109,7 +109,11 @@ static struct { u8 rc; char *msg; int re
21 #define SMAPI_PORT2 0x4F /* fixed port, meaning unclear */
22 static unsigned short smapi_port; /* APM control port, normally 0xB2 */
24 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
25 static DECLARE_MUTEX(smapi_mutex);
27 +static DEFINE_SEMAPHORE(smapi_mutex);
31 * find_smapi_port - read SMAPI port from NVRAM