MBCS: convert dmawritelock to mutex
MBCS: Convert the semaphore dmawritelock to the mutex API
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 035575c..7321c14 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -310,7 +310,7 @@
{
int rv = 0;
- if (down_interruptible(&soft->dmawritelock))
+ if (mutex_lock_interruptible(&soft->dmawritelock))
return -ERESTARTSYS;
atomic_set(&soft->dmawrite_done, 0);
@@ -336,7 +336,7 @@
*off += len;
dmawrite_exit:
- up(&soft->dmawritelock);
+ mutex_unlock(&soft->dmawritelock);
return rv;
}
@@ -763,7 +763,7 @@
init_waitqueue_head(&soft->dmaread_queue);
init_waitqueue_head(&soft->algo_queue);
- init_MUTEX(&soft->dmawritelock);
+ mutex_init(&soft->dmawritelock);
init_MUTEX(&soft->dmareadlock);
mutex_init(&soft->algolock);