[PATCH] USB: Store port number in usb_device

This patch (as610) adds a field to struct usb_device to store the device's
port number.  This allows us to remove several loops in the hub driver
(searching for a particular device among all the entries in the parent's
array of children).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alan Stern
2005-11-23 12:09:52 -05:00
committed by Greg Kroah-Hartman
parent 55c527187c
commit 12c3da346e
3 changed files with 20 additions and 61 deletions

View File

@@ -348,6 +348,7 @@ struct usb_device {
char **rawdescriptors; /* Raw descriptors for each config */
unsigned short bus_mA; /* Current available from the bus */
u8 portnum; /* Parent port number (origin 1) */
int have_langid; /* whether string_langid is valid */
int string_langid; /* language ID for strings */