Commit 46bca696 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds

MBCS: convert dmawritelock to mutex

MBCS: Convert the semaphore dmawritelock to the mutex API
Signed-off-by: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a40ba849
......@@ -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);
......
......@@ -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;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment