usb-host: properly release port on unplug & exit
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Jan 2012 14:49:18 +0000 (15:49 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 6 Jan 2012 11:36:14 +0000 (12:36 +0100)
commitc75fead66e25b35b867b661ee92087dc245a48c9
tree22b590cf2c5d3ad3ce583c00ee45a338ac9a4af0
parent24a5bbe1c8cd6f5e90100b42eac29f41c33939de
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