Re: patch usb-iowarrior.patch added to gregkh-2.6 tree
Samuel Ortiz <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > +static int iowarrior_release(struct inode *inode, struct file *file) > +{ > + struct iowarrior *dev; > + int retval = 0; > + > + dev = (struct iowarrior *)file->private_data; > + if (dev == NULL) { > + return -ENODEV; > + } > + > + dbg("%s - minor %d", __func__, dev->minor); > + > + /* lock our device */ > + mutex_lock(&dev->mutex); > + > + if (dev->opened <= 0) { > + retval = -ENODEV; /* close called more than once */ > + } else { > + dev->opened = 0; /* we're closeing now */ > + retval = 0; > + if (dev->present) { > + /* > + The device is still connected so we only shutdown > + pending read-/write-ops. > + */ > + usb_kill_urb(dev->int_in_urb); > + wake_up_interruptible(&dev->read_wait); > + wake_up_interruptible(&dev->write_wait); > + mutex_lock(&dev->mutex); Isn't it mutex_unlock() that should be called here ? Cheers, Samuel. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel