usb-host: properly release port on unplug & exit
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Jan 2012 14:49:18 +0000 (15:49 +0100)
committerJustin M. Forbes <jforbes@redhat.com>
Tue, 10 Jan 2012 15:45:37 +0000 (09:45 -0600)
commit85dc360b422ebe685bcb5e6801d4c91922fdefa5
treeb1927eaf5f1ae3faf10c6adc475a9ae2c979bba0
parent31058c319b0558f617a29c556264970d6017c0fd
usb-host: properly release port on unplug & exit

Factor out port release into a separate function.  Call release function
in exit notifier too.  Add explicit call the USBDEVFS_RELEASE_PORT
ioctl, just closing the hub file handle seems not to be enougth.  Make
sure we release the port before resetting the device, otherwise host
drivers will not re-attach.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-linux.c