Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83845
b: refs/heads/master
c: a40ba84
h: refs/heads/master
i:
  83843: d5ff4aa
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed Feb 7, 2008
1 parent 3bef029 commit 9107004
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92df5c3e38c0a0a66a456926039548275dfb3328
refs/heads/master: a40ba8495798fa7eae6fa12b16a0d06d906ba47f
7 changes: 4 additions & 3 deletions trunk/drivers/char/mbcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/uio.h>
#include <linux/mutex.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
Expand Down Expand Up @@ -281,7 +282,7 @@ static inline int mbcs_algo_start(struct mbcs_soft *soft)
void *mmr_base = soft->mmr_base;
union cm_control cm_control;

if (down_interruptible(&soft->algolock))
if (mutex_lock_interruptible(&soft->algolock))
return -ERESTARTSYS;

atomic_set(&soft->algo_done, 0);
Expand All @@ -298,7 +299,7 @@ static inline int mbcs_algo_start(struct mbcs_soft *soft)
cm_control.alg_go = 1;
MBCS_MMR_SET(mmr_base, MBCS_CM_CONTROL, cm_control.cm_control_reg);

up(&soft->algolock);
mutex_unlock(&soft->algolock);

return 0;
}
Expand Down Expand Up @@ -764,7 +765,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id)

init_MUTEX(&soft->dmawritelock);
init_MUTEX(&soft->dmareadlock);
init_MUTEX(&soft->algolock);
mutex_init(&soft->algolock);

mbcs_getdma_init(&soft->getdma);
mbcs_putdma_init(&soft->putdma);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/mbcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ struct mbcs_soft {
atomic_t algo_done;
struct semaphore dmawritelock;
struct semaphore dmareadlock;
struct semaphore algolock;
struct mutex algolock;
};

static int mbcs_open(struct inode *ip, struct file *fp);
Expand Down

0 comments on commit 9107004

Please sign in to comment.