diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2012-09-05 01:44:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-10 15:59:42 -0400 |
commit | ff823c79a5c33194c2e5594f7c4686ea3547910c (patch) | |
tree | 0685b5aee627d7f3440dc09865a7715406cfee54 /drivers/staging | |
parent | fa2a9566257a3b62c328ea5d621ccf5952079dac (diff) |
usb: move children to struct usb_port
The usb_device structure contains an array of usb_device "children".
This array is only valid if the usb_device is a hub, so it makes no
sense to store it there. Instead, store the usb_device child
in its parent usb_port structure.
Since usb_port is an internal USB core structure, add a new function to
get the USB device child, usb_hub_find_child(). Add a new macro,
usb_hub_get_each_child(), to iterate over all the children attached to a
particular USB hub.
Remove the printing the USB children array pointer from the usb-ip
driver, since it's really not necessary.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/usbip/usbip_common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 70f23026932..95beb76497d 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c | |||
@@ -157,8 +157,7 @@ static void usbip_dump_usb_device(struct usb_device *udev) | |||
157 | dev_dbg(dev, "have_langid %d, string_langid %d\n", | 157 | dev_dbg(dev, "have_langid %d, string_langid %d\n", |
158 | udev->have_langid, udev->string_langid); | 158 | udev->have_langid, udev->string_langid); |
159 | 159 | ||
160 | dev_dbg(dev, "maxchild %d, children %p\n", | 160 | dev_dbg(dev, "maxchild %d\n", udev->maxchild); |
161 | udev->maxchild, udev->children); | ||
162 | } | 161 | } |
163 | 162 | ||
164 | static void usbip_dump_request_type(__u8 rt) | 163 | static void usbip_dump_request_type(__u8 rt) |