]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
usb: split usb_new_device for clarity and refactoring
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Wed, 1 Aug 2007 03:34:05 +0000 (20:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:07 +0000 (14:55 -0700)
commitd9d16e8a92e385c9f57d2081b7aa737770a0a829
treee8564a5c32783fd982dd5e9cf7ebd3dd80d25409
parentf8a374648b58e5cfa14447eca866aed14a4fbfa8
usb: split usb_new_device for clarity and refactoring

This patch takes hub.c:usb_new_device() and splits it in three parts:

- The actual actions of adding a new device (quirk detection,
  announcement and autoresume tracking)

- Actual discovery and probing of the configuration and interfaces
  (split into __usb_configure_device())

- Configuration of the On-the-go parameters (split into
  __usb_configure_device_otg()).

The fundamental reasons for doing this split are clarity (smaller
functions are easier to maintain) and to allow part of the code to be
reused when authorizing devices to connect.

When a device is authorized connection, we need to run through the
hoops we didn't run when it was connected but not authorized, which is
basically parsing the configurations and probing
them. usb_configure_device() will do that for us.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c