diff options
author | Matthias Kaehlcke <matthias.kaehlcke@gmail.com> | 2008-02-07 03:15:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:25 -0500 |
commit | ae5e29798afa2b11a01fcb4fab8b58fee47fe155 (patch) | |
tree | 788f3eb9a8cc173219720eb58c1fb54f170c6b1f /drivers/char/mbcs.c | |
parent | 46bca69682731104b42f99da763b9a08a0574291 (diff) |
MBCS: convert dmareadlock to mutex
MBCS: Convert the semaphore dmareadlock 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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 7321c14868af..f4716ad7348a 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -347,7 +347,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr, | |||
347 | { | 347 | { |
348 | int rv = 0; | 348 | int rv = 0; |
349 | 349 | ||
350 | if (down_interruptible(&soft->dmareadlock)) | 350 | if (mutex_lock_interruptible(&soft->dmareadlock)) |
351 | return -ERESTARTSYS; | 351 | return -ERESTARTSYS; |
352 | 352 | ||
353 | atomic_set(&soft->dmawrite_done, 0); | 353 | atomic_set(&soft->dmawrite_done, 0); |
@@ -372,7 +372,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr, | |||
372 | *off += len; | 372 | *off += len; |
373 | 373 | ||
374 | dmaread_exit: | 374 | dmaread_exit: |
375 | up(&soft->dmareadlock); | 375 | mutex_unlock(&soft->dmareadlock); |
376 | 376 | ||
377 | return rv; | 377 | return rv; |
378 | } | 378 | } |
@@ -764,7 +764,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id) | |||
764 | init_waitqueue_head(&soft->algo_queue); | 764 | init_waitqueue_head(&soft->algo_queue); |
765 | 765 | ||
766 | mutex_init(&soft->dmawritelock); | 766 | mutex_init(&soft->dmawritelock); |
767 | init_MUTEX(&soft->dmareadlock); | 767 | mutex_init(&soft->dmareadlock); |
768 | mutex_init(&soft->algolock); | 768 | mutex_init(&soft->algolock); |
769 | 769 | ||
770 | mbcs_getdma_init(&soft->getdma); | 770 | mbcs_getdma_init(&soft->getdma); |