]> git.draconx.ca Git - gentoo-draconx.git/commitdiff
tp_smapi: Fix build on 2.6.37.
authorNick Bowler <nbowler@draconx.ca>
Sun, 21 Nov 2010 16:21:40 +0000 (11:21 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 21 Nov 2010 16:21:40 +0000 (11:21 -0500)
app-laptop/tp_smapi/Manifest
app-laptop/tp_smapi/files/0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch [new file with mode: 0644]
app-laptop/tp_smapi/tp_smapi-0.40.ebuild

index 2249b92f806f29e0518f778af03f0064b4289185..d8fce003dbf00cdad699c9d04040a8b7bd39c52c 100644 (file)
@@ -1,3 +1,4 @@
+AUX 0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch 1321 RMD160 347a7d55ff992c1ee3586578049b96f34b95fe7e SHA1 8e14a7e87d7c932fb1d8e2ca825d5d87eb099eb5 SHA256 bfdd14c5ec4010143a5c3d20da5d1fed83270472cf16119e074023657a94bc17
 AUX tp_smapi-fix-vercheck.patch 503 RMD160 4a393fafa4316ea0b66ba95d044a053de2a43f0c SHA1 b2e0e26be961d2f2a3c8c4080be124beb8cd149d SHA256 9e6a878b2593f7809ea8a9f7939d9091d1faf5c8ff88e8e35d5b4572c13f4a25
 DIST tp_smapi-0.40.tgz 39002 RMD160 8b564396afe6255476e73c9c78bd47294eeb8d53 SHA1 bc1bd1c6558d1972501e816308234d48ac530fc6 SHA256 ccb0965684cad076160750f2ac380f99373fa73f0bcc1091ffce2492f56349ab
-EBUILD tp_smapi-0.40.ebuild 1440 RMD160 38d28cc789545d8480e9c2cbab6089f42637c0e8 SHA1 5214a85206646c198be48868d324414b0f15c56f SHA256 68dc18a01403985df447b00afad4fcd66446ee22cbcebbe103fbdc5cb6be1b75
+EBUILD tp_smapi-0.40.ebuild 1515 RMD160 547f94cada469bdb99f038645eaba9097b8a3443 SHA1 376398f579f6ab7a92d72faadc35d11e437d7435 SHA256 d1c44d26199487069351d175129f16d4fc41912393b5f59552c0fdf0258ee5f2
diff --git a/app-laptop/tp_smapi/files/0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch b/app-laptop/tp_smapi/files/0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch
new file mode 100644 (file)
index 0000000..438e8a6
--- /dev/null
@@ -0,0 +1,39 @@
+From 90d564a00cca544b9eb4e6eff3790d5f0f8676b0 Mon Sep 17 00:00:00 2001
+From: Nick Bowler <nbowler@draconx.ca>
+Date: Wed, 17 Nov 2010 21:24:42 -0500
+Subject: [PATCH] Convert DECLARE_MUTEX to DEFINE_SEMAPHORE.
+
+---
+ thinkpad_ec.c |    2 +-
+ tp_smapi.c    |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/thinkpad_ec.c b/thinkpad_ec.c
+index 2d77a64..e026a72 100644
+--- a/thinkpad_ec.c
++++ b/thinkpad_ec.c
+@@ -88,7 +88,7 @@ static u64 prefetch_jiffies;                      /* time of prefetch, or: */
+ #define TPC_PREFETCH_JUNK   (INITIAL_JIFFIES+1)   /*   Ignore prefetch */
+ /* Locking: */
+-static DECLARE_MUTEX(thinkpad_ec_mutex);
++static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
+ /* 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 --git a/tp_smapi.c b/tp_smapi.c
+index 0cdbd0e..f6c833f 100644
+--- a/tp_smapi.c
++++ b/tp_smapi.c
+@@ -109,7 +109,7 @@ 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 */
+-static DECLARE_MUTEX(smapi_mutex);
++static DEFINE_SEMAPHORE(smapi_mutex);
+ /**
+  * find_smapi_port - read SMAPI port from NVRAM
+-- 
+1.7.2.2
+
index 1f3ec0d3d4e7d52e6551e29c711b18f74d85d823..ccd965b2c37c81c3b5ab39f1fb77c4bd8e706371 100644 (file)
@@ -53,6 +53,7 @@ pkg_setup() {
 
 src_prepare() {
        epatch "${FILESDIR}"/${PN}-fix-vercheck.patch
+       epatch "${FILESDIR}"/0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch
 }
 
 src_install() {