aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mbcs.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2008-02-07 03:15:24 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 11:42:25 -0500
commita40ba8495798fa7eae6fa12b16a0d06d906ba47f (patch)
treef741ef886c3cafcea261c184ce7776df098df8e4 /drivers/char/mbcs.c
parent92df5c3e38c0a0a66a456926039548275dfb3328 (diff)
MBCS: convert algolock to mutex
MBCS: Convert the semaphore algolock 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 3c5802ae1716..035575c041cd 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -23,6 +23,7 @@
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/uio.h> 25#include <linux/uio.h>
26#include <linux/mutex.h>
26#include <asm/io.h> 27#include <asm/io.h>
27#include <asm/uaccess.h> 28#include <asm/uaccess.h>
28#include <asm/system.h> 29#include <asm/system.h>
@@ -281,7 +282,7 @@ static inline int mbcs_algo_start(struct mbcs_soft *soft)
281 void *mmr_base = soft->mmr_base; 282 void *mmr_base = soft->mmr_base;
282 union cm_control cm_control; 283 union cm_control cm_control;
283 284
284 if (down_interruptible(&soft->algolock)) 285 if (mutex_lock_interruptible(&soft->algolock))
285 return -ERESTARTSYS; 286 return -ERESTARTSYS;
286 287
287 atomic_set(&soft->algo_done, 0); 288 atomic_set(&soft->algo_done, 0);
@@ -298,7 +299,7 @@ static inline int mbcs_algo_start(struct mbcs_soft *soft)
298 cm_control.alg_go = 1; 299 cm_control.alg_go = 1;
299 MBCS_MMR_SET(mmr_base, MBCS_CM_CONTROL, cm_control.cm_control_reg); 300 MBCS_MMR_SET(mmr_base, MBCS_CM_CONTROL, cm_control.cm_control_reg);
300 301
301 up(&soft->algolock); 302 mutex_unlock(&soft->algolock);
302 303
303 return 0; 304 return 0;
304} 305}
@@ -764,7 +765,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id)
764 765
765 init_MUTEX(&soft->dmawritelock); 766 init_MUTEX(&soft->dmawritelock);
766 init_MUTEX(&soft->dmareadlock); 767 init_MUTEX(&soft->dmareadlock);
767 init_MUTEX(&soft->algolock); 768 mutex_init(&soft->algolock);
768 769
769 mbcs_getdma_init(&soft->getdma); 770 mbcs_getdma_init(&soft->getdma);
770 mbcs_putdma_init(&soft->putdma); 771 mbcs_putdma_init(&soft->putdma);