USB: announce new devices earlier
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 <75ea6bb7bfc1186f92d26164de5f9268c9a45b59@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>


TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs