]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MBCS: convert dmareadlock to mutex
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Thu, 7 Feb 2008 08:15:25 +0000 (00:15 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Feb 2008 16:42:25 +0000 (08:42 -0800)
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>
drivers/char/mbcs.c
drivers/char/mbcs.h

index 7321c14868af4ba17f7039f25548643a5ef8cce8..f4716ad7348ae7185bdba2a35379b9a68fd37a63 100644 (file)
@@ -347,7 +347,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr,
 {
        int rv = 0;
 
-       if (down_interruptible(&soft->dmareadlock))
+       if (mutex_lock_interruptible(&soft->dmareadlock))
                return -ERESTARTSYS;
 
        atomic_set(&soft->dmawrite_done, 0);
@@ -372,7 +372,7 @@ do_mbcs_sram_dmaread(struct mbcs_soft *soft, uint64_t hostAddr,
        *off += len;
 
 dmaread_exit:
-       up(&soft->dmareadlock);
+       mutex_unlock(&soft->dmareadlock);
 
        return rv;
 }
@@ -764,7 +764,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id)
        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);
index b05435145d7200c1871ace7f4376f401727d860b..ba671589f4cba31716a0b1ac4f505e39003b5626 100644 (file)
@@ -538,7 +538,7 @@ struct mbcs_soft {
        atomic_t dmaread_done;
        atomic_t algo_done;
        struct mutex dmawritelock;
-       struct semaphore dmareadlock;
+       struct mutex dmareadlock;
        struct mutex algolock;
 };