summaryrefslogtreecommitdiff
path: root/drivers/char/mbcs.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2008-02-07 00:15:24 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 08:42:25 -0800
commit46bca69682731104b42f99da763b9a08a0574291 (patch)
tree46871c6415ff483e23b5a497ec4761c70c3556af /drivers/char/mbcs.c
parenta40ba8495798fa7eae6fa12b16a0d06d906ba47f (diff)
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>
Diffstat (limited to 'drivers/char/mbcs.c')
-rw-r--r--drivers/char/mbcs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 035575c041cd..7321c14868af 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -310,7 +310,7 @@ do_mbcs_sram_dmawrite(struct mbcs_soft *soft, uint64_t hostAddr,
{
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 @@ do_mbcs_sram_dmawrite(struct mbcs_soft *soft, uint64_t hostAddr,
*off += len;
dmawrite_exit:
- up(&soft->dmawritelock);
+ mutex_unlock(&soft->dmawritelock);
return rv;
}
@@ -763,7 +763,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id)
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);