提交 ae5e2979 编写于 作者: M Matthias Kaehlcke 提交者: Linus Torvalds

MBCS: convert dmareadlock to mutex

MBCS: Convert the semaphore dmareadlock to the mutex API
Signed-off-by: NMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 46bca696
...@@ -347,7 +347,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr, ...@@ -347,7 +347,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr,
{ {
int rv = 0; int rv = 0;
if (down_interruptible(&soft->dmareadlock)) if (mutex_lock_interruptible(&soft->dmareadlock))
return -ERESTARTSYS; return -ERESTARTSYS;
atomic_set(&soft->dmawrite_done, 0); atomic_set(&soft->dmawrite_done, 0);
...@@ -372,7 +372,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr, ...@@ -372,7 +372,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr,
*off += len; *off += len;
dmaread_exit: dmaread_exit:
up(&soft->dmareadlock); mutex_unlock(&soft->dmareadlock);
return rv; return rv;
} }
...@@ -764,7 +764,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id) ...@@ -764,7 +764,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id)
init_waitqueue_head(&soft->algo_queue); init_waitqueue_head(&soft->algo_queue);
mutex_init(&soft->dmawritelock); mutex_init(&soft->dmawritelock);
init_MUTEX(&soft->dmareadlock); mutex_init(&soft->dmareadlock);
mutex_init(&soft->algolock); mutex_init(&soft->algolock);
mbcs_getdma_init(&soft->getdma); mbcs_getdma_init(&soft->getdma);
......
...@@ -538,7 +538,7 @@ struct mbcs_soft { ...@@ -538,7 +538,7 @@ struct mbcs_soft {
atomic_t dmaread_done; atomic_t dmaread_done;
atomic_t algo_done; atomic_t algo_done;
struct mutex dmawritelock; struct mutex dmawritelock;
struct semaphore dmareadlock; struct mutex dmareadlock;
struct mutex algolock; struct mutex algolock;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册