Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d9d16e8a authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez Committed by Greg Kroah-Hartman
Browse files

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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f8a37464
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment