From a40ba8495798fa7eae6fa12b16a0d06d906ba47f Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Thu, 7 Feb 2008 00:15:24 -0800 Subject: MBCS: convert algolock to mutex MBCS: Convert the semaphore algolock to the mutex API Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/mbcs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/char/mbcs.c') diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 3c5802ae171..035575c041c 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -281,7 +282,7 @@ static inline int mbcs_algo_start(struct mbcs_soft *soft) void *mmr_base = soft->mmr_base; union cm_control cm_control; - if (down_interruptible(&soft->algolock)) + if (mutex_lock_interruptible(&soft->algolock)) return -ERESTARTSYS; atomic_set(&soft->algo_done, 0); @@ -298,7 +299,7 @@ static inline int mbcs_algo_start(struct mbcs_soft *soft) cm_control.alg_go = 1; MBCS_MMR_SET(mmr_base, MBCS_CM_CONTROL, cm_control.cm_control_reg); - up(&soft->algolock); + mutex_unlock(&soft->algolock); return 0; } @@ -764,7 +765,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id) init_MUTEX(&soft->dmawritelock); init_MUTEX(&soft->dmareadlock); - init_MUTEX(&soft->algolock); + mutex_init(&soft->algolock); mbcs_getdma_init(&soft->getdma); mbcs_putdma_init(&soft->putdma); -- cgit v1.2.3-18-g5258