mirror of
https://github.com/linux-thinkpad/tp_smapi.git
synced 2024-09-11 07:05:28 +03:00
use DEFINE_SEMAPHORE in 2.6.37+
Building tp_smapi against 2.6.37 fails because 'DECLARE_MUTEX' has been removed in 4882720b267b7b1d1b0ce08334b205f0329d4615 in torvalds/linux-2.6.git. Use DEFINE_SEMAPHORE instead.
This commit is contained in:
parent
ecd90e2a2a
commit
4b812d4f58
@ -88,7 +88,11 @@ static u64 prefetch_jiffies; /* time of prefetch, or: */
|
||||
#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? */
|
||||
|
@ -109,7 +109,11 @@ static struct { u8 rc; char *msg; int ret; } smapi_retcode[] =
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user