On Sat, Mar 19, 2011 at 12:36:56PM +0100, Harald Jenny wrote: > This error went away but there is another one now, please see attached log. > [...] > CC [M] /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.o > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:236:8: warning: > type defaults to 'int' in declaration of 'DECLARE_MUTEX' > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:236:1: warning: > parameter names (without types) in function declaration > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c: In function > 'st7554_open': > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1001:8: error: > 'open_sem' undeclared (first use in this function) > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1001:8: note: > each undeclared identifier is reported only once for each function it appears > in > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c: In function > 'st7554_probe': > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1237:2: error: > implicit declaration of function 'init_MUTEX' > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1320:8: error: > 'open_sem' undeclared (first use in this function) > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1336:2: > warning: passing argument 2 of 'device_create' makes pointer from integer > without a cast > include/linux/device.h:598:23: note: expected 'struct device *' but argument > is of type 'int' > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1336:2: > warning: passing argument 3 of 'device_create' makes integer from pointer > without a cast > include/linux/device.h:598:23: note: expected 'dev_t' but argument is of type > 'void *' > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1336:2: > warning: passing argument 5 of 'device_create' makes pointer from integer > without a cast > include/linux/device.h:598:23: note: expected 'const char *' but argument is > of type 'int' > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c: In function > 'st7554_disconnect': > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:1367:8: error: > 'open_sem' undeclared (first use in this function) > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c: At top level: > /var/lib/dkms/sl-modem/2.9.11~20100718/build/drivers/st7554.c:236:8: warning: > 'DECLARE_MUTEX' declared 'static' but never defined ---end quoted text---
Thanks for your report, please try the attached patch. -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyID: 0xEDDDA1B7 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7
Description: Fix compilation of slusb with 2.6.37 *_MUTEX got deprecated since kernel 2.6.37 Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmo...@sabily.org> Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613906 Bug-Ubuntu: https://bugs.launchpad.net/bugs/737650 --- a/drivers/st7554.c +++ b/drivers/st7554.c @@ -233,7 +233,11 @@ static struct class *st7554_class; #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) static DECLARE_MUTEX(open_sem); +#else +static DEFINE_SEMAPHORE(open_sem); +#endif /* --------------------------------------------------------------------- */ @@ -1234,7 +1238,11 @@ memset(s, 0, sizeof(*s)); spin_lock_init(&s->lock); +#ifdef init_MUTEX init_MUTEX (&s->sem); +#else + sema_init (&s->sem); +#endif init_waitqueue_head(&s->wait); s->name = "ST7554 USB Modem";
signature.asc
Description: Digital signature