From: Andrew Morton drivers/mtd/devices/m25p80.c: In function 'm25p80_erase': drivers/mtd/devices/m25p80.c:203: warning: passing argument 1 of 'mutex_lock' from incompatible pointer type drivers/mtd/devices/m25p80.c:209: warning: passing argument 1 of 'mutex_unlock' from incompatible pointer type drivers/mtd/devices/m25p80.c:217: warning: passing argument 1 of 'mutex_unlock' from incompatible pointer type drivers/mtd/devices/m25p80.c: In function 'm25p80_read': drivers/mtd/devices/m25p80.c:262: warning: passing argument 1 of 'mutex_lock' from incompatible pointer type drivers/mtd/devices/m25p80.c:267: warning: passing argument 1 of 'mutex_unlock' from incompatible pointer type drivers/mtd/devices/m25p80.c:283: warning: passing argument 1 of 'mutex_unlock' from incompatible pointer type drivers/mtd/devices/m25p80.c: In function 'm25p80_write': drivers/mtd/devices/m25p80.c:325: warning: passing argument 1 of 'mutex_lock' from incompatible pointer type drivers/mtd/devices/m25p80.c:386: warning: passing argument 1 of 'mutex_unlock' from incompatible pointer type drivers/mtd/devices/m25p80.c: In function 'm25p_probe': drivers/mtd/devices/m25p80.c:458: warning: passing argument 1 of '__mutex_init' from incompatible pointer type eh? Cc: David Woodhouse Cc: Matthias Kaehlcke Signed-off-by: Andrew Morton --- drivers/mtd/devices/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/mtd/devices/m25p80.c~use-mutex-instead-of-semaphore-in-the-mtd-st-m25pxx-driver-build-fix drivers/mtd/devices/m25p80.c --- a/drivers/mtd/devices/m25p80.c~use-mutex-instead-of-semaphore-in-the-mtd-st-m25pxx-driver-build-fix +++ a/drivers/mtd/devices/m25p80.c @@ -64,7 +64,7 @@ struct m25p { struct spi_device *spi; - struct semaphore lock; + struct mutex lock; struct mtd_info mtd; unsigned partitioned; u8 command[4]; _