Package: tp-smapi-source
Version: 0.40-8
Severity: normal

Hi!

I tried to build tp-smapi-module for Linux 2.6.37-rc1, but gave error below.

--

  CC [M]  /usr/src/modules/tp-smapi/thinkpad_ec.o
/usr/src/modules/tp-smapi/thinkpad_ec.c:91: warning: type defaults to
'int' in declaration of 'DECLARE_MUTEX'
/usr/src/modules/tp-smapi/thinkpad_ec.c:91: warning: parameter names
(without types) in function declaration
/usr/src/modules/tp-smapi/thinkpad_ec.c: In function 'thinkpad_ec_lock':
/usr/src/modules/tp-smapi/thinkpad_ec.c:108: error:
'thinkpad_ec_mutex' undeclared (first use in this function)
/usr/src/modules/tp-smapi/thinkpad_ec.c:108: error: (Each undeclared
identifier is reported only once
/usr/src/modules/tp-smapi/thinkpad_ec.c:108: error: for each function
it appears in.)
/usr/src/modules/tp-smapi/thinkpad_ec.c: In function 'thinkpad_ec_try_lock':
/usr/src/modules/tp-smapi/thinkpad_ec.c:122: error:
'thinkpad_ec_mutex' undeclared (first use in this function)
/usr/src/modules/tp-smapi/thinkpad_ec.c: In function 'thinkpad_ec_unlock':
/usr/src/modules/tp-smapi/thinkpad_ec.c:134: error:
'thinkpad_ec_mutex' undeclared (first use in this function)

--

'DECLARE_MUTEX' has been removed since next commit.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4882720b267b7b1d1b0ce08334b205f0329d4615

I apply the below patch. It worksforme.

--
diff --git a/thinkpad_ec.c b/thinkpad_ec.c
--- a/thinkpad_ec.c
+++ b/thinkpad_ec.c
@@ -88,7 +88,11 @@ static u64 prefetch_jiffies;
 #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 --git a/tp_smapi.c b/tp_smapi.c
--- a/tp_smapi.c
+++ b/tp_smapi.c
@@ -109,7 +109,11 @@ static struct { u8 rc; char *msg; int re
 #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
--

Regards.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.37-rc1 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tp-smapi-source depends on:
ii  debhelper                     8.0.0      helper programs for debian/rules
ii  module-assistant              0.11.3     tool to make module package creati

tp-smapi-source recommends no packages.

Versions of packages tp-smapi-source suggests:
ii  sysfsutils                2.1.0+repack-1 sysfs query tool and boot-time set

-- no debconf information

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.37-rc1 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tp-smapi-source depends on:
ii  debhelper                     8.0.0      helper programs for debian/rules
ii  module-assistant              0.11.3     tool to make module package creati

tp-smapi-source recommends no packages.

Versions of packages tp-smapi-source suggests:
ii  sysfsutils                2.1.0+repack-1 sysfs query tool and boot-time set

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to