[ltp] thinkpad-smapi from tp-smapi-source 0.40-8 does not build for 2.6.37-rc3

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Wed, 24 Nov 2010 07:57:18 -0200


On Wed, 24 Nov 2010, Martin Steigerwald wrote:
> Am Mittwoch 24 November 2010 schrieb Henrique de Moraes Holschuh:
> > On Tue, 23 Nov 2010, Martin Steigerwald wrote:
> > > m-a a-i tp-smapi fails to build on 2.6.37-rc3, while build works on
> > 
> > > 2.6.36:
> > ...
> > 
> > > /usr/src/modules/tp-smapi/thinkpad_ec.c:91: warning: type defaults to
> > > ‘int’ in declaration of ‘DECLARE_MUTEX’
> > 
> > Hmm, needs to be changed to either use semasphores or mutexes.  The old
> > semaphore-as-mutex is gone in 2.6.36.
> 
> In 2.6.36 it still compiled, so must be a change between 2.6.36 and 
> 2.6.37.

Yes.  commit 4882720b267b7b1d1b0ce08334b205f0329d4615 and a few others
before it.

It should not be too difficult, one can either use semasphores (if
they're needed in interrupt context), or the new mutexes (if they are
not needed in interrupt context).  I don't think thinkpad-ec does
anything funny, so it should not cause problems with the strict mutex
constraints and the lock/mutex validator.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh