aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2007-05-25 00:59:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-06-08 19:24:29 -0400
commit97cb95d1c4b724bc3bedd16dd022fbd3c2d61283 (patch)
tree8ae7b01a99055e928cc30fac36437b3f3517d089 /drivers/usb
parentdda034bcb51a0a28318046d74d664e0fc5f7d1d4 (diff)
usblp: Don't let suspend to kill ->used
Suspend destroys refcounting for open/release. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/class/usblp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 7b1edfe46b28..6778f9af7943 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -347,10 +347,8 @@ static int handle_bidir (struct usblp *usblp)
347 if (usblp->bidir && usblp->used && !usblp->sleeping) { 347 if (usblp->bidir && usblp->used && !usblp->sleeping) {
348 usblp->readcount = 0; 348 usblp->readcount = 0;
349 usblp->readurb->dev = usblp->dev; 349 usblp->readurb->dev = usblp->dev;
350 if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0) { 350 if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0)
351 usblp->used = 0;
352 return -EIO; 351 return -EIO;
353 }
354 } 352 }
355 353
356 return 0; 354 return 0;
@@ -412,6 +410,7 @@ static int usblp_open(struct inode *inode, struct file *file)
412 usblp->readurb->status = 0; 410 usblp->readurb->status = 0;
413 411
414 if (handle_bidir(usblp) < 0) { 412 if (handle_bidir(usblp) < 0) {
413 usblp->used = 0;
415 file->private_data = NULL; 414 file->private_data = NULL;
416 retval = -EIO; 415 retval = -EIO;
417 } 416 }