diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-08-30 15:46:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 14:58:57 -0400 |
commit | b6956ffa595db97656d5901ca8fec77ef272d41a (patch) | |
tree | de10e798f086de6d0fcda6f8d2423ef176d13839 /drivers/usb | |
parent | d1ad4ea331e78a5ff90eda7718da31bcbc1a9c38 (diff) |
usbcore: store each usb_device's level in the tree
This patch (as778) adds a field to struct usb_device to store the
device's level in the USB tree. In itself this number isn't really
important. But the overhead is very low, and in a later patch it will
be used for preventing bogus warnings from the lockdep checker.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hub.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index f5adce049b35..78e910b2046c 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -2414,6 +2414,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, | |||
2414 | usb_set_device_state(udev, USB_STATE_POWERED); | 2414 | usb_set_device_state(udev, USB_STATE_POWERED); |
2415 | udev->speed = USB_SPEED_UNKNOWN; | 2415 | udev->speed = USB_SPEED_UNKNOWN; |
2416 | udev->bus_mA = hub->mA_per_port; | 2416 | udev->bus_mA = hub->mA_per_port; |
2417 | udev->level = hdev->level + 1; | ||
2417 | 2418 | ||
2418 | /* set the address */ | 2419 | /* set the address */ |
2419 | choose_address(udev); | 2420 | choose_address(udev); |