[PATCH] USB: Minor tidying up of hub driver
After my last few changesets there were a few small items that needed to be tidied up. Update kerneldoc to reflect the actual operation of usb_disconnect() and usb_new_device(). The new locking requirements are listed too, though they aren't all implemented yet. Fulfill the new locking requirement in hcd_panic(). Remove unneeded local variables to conserve stack space in usb_disconnect(), which calls itself recursively. In hub_port_connect_change(), store the parent's children[] pointer as late as possible and don't lock the new device until then (that's when it becomes globally accessible). This will minimize the time that the not-fully-configured device structure is visible to other parts of the kernel. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment