diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2012-05-11 04:08:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-11 20:08:41 -0400 |
commit | bebc56d58dc780539777d2b1ca80df5566e2ad87 (patch) | |
tree | e24d45842809c559c98abb6fb6b2db1445264220 /include/linux/usb.h | |
parent | f397d7c4c5e8a1eb93f2ed15808a509318ccf1dd (diff) |
usb: move struct usb_device->children to struct usb_hub_port->child
Move child's pointer to the struct usb_hub_port since the child device
is directly associated with the port. Provide usb_get_hub_child_device()
to get child's pointer.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 5483cd70390b..69163a0abe91 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -424,7 +424,6 @@ enum usb_device_removable { | |||
424 | * access from userspace | 424 | * access from userspace |
425 | * @usbfs_dentry: usbfs dentry entry for the device | 425 | * @usbfs_dentry: usbfs dentry entry for the device |
426 | * @maxchild: number of ports if hub | 426 | * @maxchild: number of ports if hub |
427 | * @children: child devices - USB devices that are attached to this hub | ||
428 | * @quirks: quirks of the whole device | 427 | * @quirks: quirks of the whole device |
429 | * @urbnum: number of URBs submitted for the whole device | 428 | * @urbnum: number of URBs submitted for the whole device |
430 | * @active_duration: total time device is not suspended | 429 | * @active_duration: total time device is not suspended |
@@ -491,7 +490,6 @@ struct usb_device { | |||
491 | struct list_head filelist; | 490 | struct list_head filelist; |
492 | 491 | ||
493 | int maxchild; | 492 | int maxchild; |
494 | struct usb_device **children; | ||
495 | 493 | ||
496 | u32 quirks; | 494 | u32 quirks; |
497 | atomic_t urbnum; | 495 | atomic_t urbnum; |
@@ -517,6 +515,8 @@ static inline struct usb_device *interface_to_usbdev(struct usb_interface *intf) | |||
517 | 515 | ||
518 | extern struct usb_device *usb_get_dev(struct usb_device *dev); | 516 | extern struct usb_device *usb_get_dev(struct usb_device *dev); |
519 | extern void usb_put_dev(struct usb_device *dev); | 517 | extern void usb_put_dev(struct usb_device *dev); |
518 | extern struct usb_device *usb_get_hub_child_device(struct usb_device *hdev, | ||
519 | int port1); | ||
520 | 520 | ||
521 | /* USB device locking */ | 521 | /* USB device locking */ |
522 | #define usb_lock_device(udev) device_lock(&(udev)->dev) | 522 | #define usb_lock_device(udev) device_lock(&(udev)->dev) |