From: Matthias Kaehlcke Date: Thu, 7 Feb 2008 08:15:24 +0000 (-0800) Subject: MBCS: convert dmawritelock to mutex X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=46bca69682731104b42f99da763b9a08a0574291;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git MBCS: convert dmawritelock to mutex MBCS: Convert the semaphore dmawritelock to the mutex API Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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); diff --git a/drivers/char/mbcs.h b/drivers/char/mbcs.h index d4d97abbce7f..b05435145d72 100644 --- a/drivers/char/mbcs.h +++ b/drivers/char/mbcs.h @@ -537,7 +537,7 @@ struct mbcs_soft { atomic_t dmawrite_done; atomic_t dmaread_done; atomic_t algo_done; - struct semaphore dmawritelock; + struct mutex dmawritelock; struct semaphore dmareadlock; struct mutex algolock; };