MBCS: Convert the semaphore dmareadlock 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>
{
int rv = 0;
- if (down_interruptible(&soft->dmareadlock))
+ if (mutex_lock_interruptible(&soft->dmareadlock))
return -ERESTARTSYS;
atomic_set(&soft->dmawrite_done, 0);
*off += len;
dmaread_exit:
- up(&soft->dmareadlock);
+ mutex_unlock(&soft->dmareadlock);
return rv;
}
init_waitqueue_head(&soft->algo_queue);
mutex_init(&soft->dmawritelock);
- init_MUTEX(&soft->dmareadlock);
+ mutex_init(&soft->dmareadlock);
mutex_init(&soft->algolock);
mbcs_getdma_init(&soft->getdma);
atomic_t dmaread_done;
atomic_t algo_done;
struct mutex dmawritelock;
- struct semaphore dmareadlock;
+ struct mutex dmareadlock;
struct mutex algolock;
};