diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/mbcs.c | 6 | ||||
-rw-r--r-- | drivers/char/mbcs.h | 2 |
2 files changed, 4 insertions, 4 deletions
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, | |||
310 | { | 310 | { |
311 | int rv = 0; | 311 | int rv = 0; |
312 | 312 | ||
313 | if (down_interruptible(&soft->dmawritelock)) | 313 | if (mutex_lock_interruptible(&soft->dmawritelock)) |
314 | return -ERESTARTSYS; | 314 | return -ERESTARTSYS; |
315 | 315 | ||
316 | atomic_set(&soft->dmawrite_done, 0); | 316 | atomic_set(&soft->dmawrite_done, 0); |
@@ -336,7 +336,7 @@ do_mbcs_sram_dmawrite(struct mbcs_soft *soft, uint64_t hostAddr, | |||
336 | *off += len; | 336 | *off += len; |
337 | 337 | ||
338 | dmawrite_exit: | 338 | dmawrite_exit: |
339 | up(&soft->dmawritelock); | 339 | mutex_unlock(&soft->dmawritelock); |
340 | 340 | ||
341 | return rv; | 341 | return rv; |
342 | } | 342 | } |
@@ -763,7 +763,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id) | |||
763 | init_waitqueue_head(&soft->dmaread_queue); | 763 | init_waitqueue_head(&soft->dmaread_queue); |
764 | init_waitqueue_head(&soft->algo_queue); | 764 | init_waitqueue_head(&soft->algo_queue); |
765 | 765 | ||
766 | init_MUTEX(&soft->dmawritelock); | 766 | mutex_init(&soft->dmawritelock); |
767 | init_MUTEX(&soft->dmareadlock); | 767 | init_MUTEX(&soft->dmareadlock); |
768 | mutex_init(&soft->algolock); | 768 | mutex_init(&soft->algolock); |
769 | 769 | ||
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 { | |||
537 | atomic_t dmawrite_done; | 537 | atomic_t dmawrite_done; |
538 | atomic_t dmaread_done; | 538 | atomic_t dmaread_done; |
539 | atomic_t algo_done; | 539 | atomic_t algo_done; |
540 | struct semaphore dmawritelock; | 540 | struct mutex dmawritelock; |
541 | struct semaphore dmareadlock; | 541 | struct semaphore dmareadlock; |
542 | struct mutex algolock; | 542 | struct mutex algolock; |
543 | }; | 543 | }; |