]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/usb/core/hub.c
USB: announce new devices earlier
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 13 Nov 2008 20:08:30 +0000 (15:08 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Jan 2009 17:59:54 +0000 (09:59 -0800)
commit6cd132015d92356b1287f6f3377a3ad955b6cf2f
tree17e1f8ebe36aa69f56e80377cd02875dac2296e2
parentf150fa1afbf69a87f54752579ff2bb769aad88b3
USB: announce new devices earlier

This patch (as1166) changes usb_new_device().  Now new devices will be
announced in the log _prior_ to being registered; this way the "new
device" lines will appear before all the output from driver probing,
which seems much more logical.

Also, the patch adds a call to usb_stop_pm() to the failure pathway,
so that the parent's count of unsuspended children will remain correct
if registration fails.  In order for this to work properly, the code
to increment that count has to be moved forward, before the first
point where a failure can occur.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c