diff options
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r-- | drivers/usb/class/usblp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index bba22e97ea0f..7ce43fb8118a 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -379,6 +379,8 @@ static int usblp_open(struct inode *inode, struct file *file) | |||
379 | usblp->writeurb->transfer_buffer_length = 0; | 379 | usblp->writeurb->transfer_buffer_length = 0; |
380 | usblp->wcomplete = 1; /* we begin writeable */ | 380 | usblp->wcomplete = 1; /* we begin writeable */ |
381 | usblp->rcomplete = 0; | 381 | usblp->rcomplete = 0; |
382 | usblp->writeurb->status = 0; | ||
383 | usblp->readurb->status = 0; | ||
382 | 384 | ||
383 | if (usblp->bidir) { | 385 | if (usblp->bidir) { |
384 | usblp->readcount = 0; | 386 | usblp->readcount = 0; |
@@ -751,6 +753,7 @@ static ssize_t usblp_read(struct file *file, char __user *buffer, size_t count, | |||
751 | schedule(); | 753 | schedule(); |
752 | } else { | 754 | } else { |
753 | set_current_state(TASK_RUNNING); | 755 | set_current_state(TASK_RUNNING); |
756 | down(&usblp->sem); | ||
754 | break; | 757 | break; |
755 | } | 758 | } |
756 | down (&usblp->sem); | 759 | down (&usblp->sem); |