• Alan Stern's avatar
    [PATCH] USB: Move usb_new_device() et al. into hub.c · f0d54de9
    Alan Stern authored
    This patch moves usb_new_device(), usb_disconnect(), usb_choose_address(),
    and usb_release_address() from usb.c to hub.c.  As a side benefit,
    choose_address() and release_address() can now become static.  The other
    two can't, because they have to be exported for use by HCD's when
    registering/unregistering root hubs.
    
    Some other features of the patch:
    
    	The usb_snddefctrl() and usb_rcvdefctrl() macros have been
    	removed, since only one of them was used and only in one spot.
    
    	The comment about configuration choice needing to interact with
    	hub power budgeting has been moved in accordance with David's
    	wish.  usb_new_device() checks to make sure a configuration
    	could be chosen and logs a warning if no choice was made.
    
    	Following Linus's preference, the #ifdef preprocessor stuff has
    	been removed from around the calls the show_string routine.  It
    	is now defined as a non-inline routine when debugging is enabled
    	and as an inline no-op otherwise (the compiler will optimize
    	away the useless tests).
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    f0d54de9
usb.c 39.8 KB