Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271690
b: refs/heads/master
c: fc4eab2
h: refs/heads/master
v: v3
  • Loading branch information
Thierry Reding authored and Mauro Carvalho Chehab committed Aug 31, 2011
1 parent c9f880a commit 3ca06ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 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: c0fa65ff9e7fdbdea7bf1bbc02fb2c3ee6814cc7
refs/heads/master: fc4eab2cbae547fb278c2583b77ee0ff7f5832d3
1 change: 1 addition & 0 deletions trunk/drivers/staging/tm6000/tm6000-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,7 @@ static int tm6000_usb_probe(struct usb_interface *interface,
return -ENOMEM;
}
spin_lock_init(&dev->slock);
mutex_init(&dev->usb_lock);

/* Increment usage count */
tm6000_devused |= 1<<nr;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/staging/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
unsigned int pipe;
u8 *data = NULL;

mutex_lock(&dev->usb_lock);

if (len)
data = kzalloc(len, GFP_KERNEL);

Expand Down Expand Up @@ -86,9 +88,9 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
}

kfree(data);

msleep(5);

mutex_unlock(&dev->usb_lock);
return ret;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/tm6000/tm6000.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ struct tm6000_core {

/* locks */
struct mutex lock;
struct mutex usb_lock;

/* usb transfer */
struct usb_device *udev; /* the usb device */
Expand Down

0 comments on commit 3ca06ee

Please sign in to comment.