]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
usb: move children to struct usb_port
authorLan Tianyu <tianyu.lan@intel.com>
Wed, 5 Sep 2012 05:44:32 +0000 (13:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2012 19:59:42 +0000 (12:59 -0700)
commitff823c79a5c33194c2e5594f7c4686ea3547910c
tree0685b5aee627d7f3440dc09865a7715406cfee54
parentfa2a9566257a3b62c328ea5d621ccf5952079dac
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>
drivers/staging/usbip/usbip_common.c
drivers/usb/core/devices.c
drivers/usb/core/hub.c
drivers/usb/host/r8a66597-hcd.c
include/linux/usb.h