diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:25:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:25:16 -0400 |
commit | be90a49ca22a95f184d9f32d35b5247b44032849 (patch) | |
tree | d3c2edc18c003c384366f57901616ac29c80bc27 /drivers/usb/misc/legousbtower.c | |
parent | 1f0918d03ff4b5c94540c71ce889672abdbc2f4a (diff) | |
parent | a87371b477774b290c27bc5cb7f4ccc5379574a9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (142 commits)
USB: Fix sysfs paths in documentation
USB: skeleton: fix coding style issues.
USB: O_NONBLOCK in read path of skeleton
USB: make usb-skeleton honor O_NONBLOCK in write path
USB: skel_read really sucks royally
USB: Add hub descriptor update hook for xHCI
USB: xhci: Support USB hubs.
USB: xhci: Set multi-TT field for LS/FS devices under hubs.
USB: xhci: Set route string for all devices.
USB: xhci: Fix command wait list handling.
USB: xhci: Change how xHCI commands are handled.
USB: xhci: Refactor input device context setup.
USB: xhci: Endpoint representation refactoring.
USB: gadget: ether needs to select CRC32
USB: fix USBTMC get_capabilities success handling
USB: fix missing error check in probing
USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag
USB: support for autosuspend in sierra while online
USB: ehci-dbgp,ehci: Allow dbpg to work with suspend/resume
USB: ehci-dbgp,documentation: Documentation updates for ehci-dbgp
...
Diffstat (limited to 'drivers/usb/misc/legousbtower.c')
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 97efeaec4d52..faa6d623de78 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -552,6 +552,9 @@ static unsigned int tower_poll (struct file *file, poll_table *wait) | |||
552 | 552 | ||
553 | dev = file->private_data; | 553 | dev = file->private_data; |
554 | 554 | ||
555 | if (!dev->udev) | ||
556 | return POLLERR | POLLHUP; | ||
557 | |||
555 | poll_wait(file, &dev->read_wait, wait); | 558 | poll_wait(file, &dev->read_wait, wait); |
556 | poll_wait(file, &dev->write_wait, wait); | 559 | poll_wait(file, &dev->write_wait, wait); |
557 | 560 | ||
@@ -1025,6 +1028,9 @@ static void tower_disconnect (struct usb_interface *interface) | |||
1025 | tower_delete (dev); | 1028 | tower_delete (dev); |
1026 | } else { | 1029 | } else { |
1027 | dev->udev = NULL; | 1030 | dev->udev = NULL; |
1031 | /* wake up pollers */ | ||
1032 | wake_up_interruptible_all(&dev->read_wait); | ||
1033 | wake_up_interruptible_all(&dev->write_wait); | ||
1028 | mutex_unlock(&dev->lock); | 1034 | mutex_unlock(&dev->lock); |
1029 | } | 1035 | } |
1030 | 1036 | ||