]> git.draconx.ca Git - gentoo-draconx.git/blob - app-laptop/tp_smapi/files/0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch
tp_smapi: Fix build on 2.6.37.
[gentoo-draconx.git] / app-laptop / tp_smapi / files / 0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch
1 From 90d564a00cca544b9eb4e6eff3790d5f0f8676b0 Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
3 Date: Wed, 17 Nov 2010 21:24:42 -0500
4 Subject: [PATCH] Convert DECLARE_MUTEX to DEFINE_SEMAPHORE.
5
6 ---
7  thinkpad_ec.c |    2 +-
8  tp_smapi.c    |    2 +-
9  2 files changed, 2 insertions(+), 2 deletions(-)
10
11 diff --git a/thinkpad_ec.c b/thinkpad_ec.c
12 index 2d77a64..e026a72 100644
13 --- a/thinkpad_ec.c
14 +++ b/thinkpad_ec.c
15 @@ -88,7 +88,7 @@ static u64 prefetch_jiffies;                      /* time of prefetch, or: */
16  #define TPC_PREFETCH_JUNK   (INITIAL_JIFFIES+1)   /*   Ignore prefetch */
17  
18  /* Locking: */
19 -static DECLARE_MUTEX(thinkpad_ec_mutex);
20 +static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
21  
22  /* Kludge in case the ACPI DSDT reserves the ports we need. */
23  static int force_io;    /* Willing to do IO to ports we couldn't reserve? */
24 diff --git a/tp_smapi.c b/tp_smapi.c
25 index 0cdbd0e..f6c833f 100644
26 --- a/tp_smapi.c
27 +++ b/tp_smapi.c
28 @@ -109,7 +109,7 @@ static struct { u8 rc; char *msg; int ret; } smapi_retcode[] =
29  #define SMAPI_PORT2 0x4F           /* fixed port, meaning unclear */
30  static unsigned short smapi_port;  /* APM control port, normally 0xB2 */
31  
32 -static DECLARE_MUTEX(smapi_mutex);
33 +static DEFINE_SEMAPHORE(smapi_mutex);
34  
35  /**
36   * find_smapi_port - read SMAPI port from NVRAM
37 -- 
38 1.7.2.2
39