diff options
author | Huajun Li <huajun.li.lee@gmail.com> | 2012-03-12 09:00:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-13 17:24:07 -0400 |
commit | 8816230e13d0c3c6ba51916d20e6d204646abf03 (patch) | |
tree | 3b9c29e8e07490fa6914fbe75c7dcfe95b84c14c /include/linux/usb.h | |
parent | 90221170bfe101de59a05910b4cb6d6e5de046b1 (diff) |
USB: dynamically allocate usb_device children pointers instead of using a fix array
Non-hub device has no child, and even a real USB hub has ports far
less than USB_MAXCHILDREN, so there is no need using a fix array for
child devices, just allocate it dynamically according real port
number.
Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 0c51663f2733..73b68d1f2cb0 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -501,7 +501,7 @@ struct usb_device { | |||
501 | #endif | 501 | #endif |
502 | 502 | ||
503 | int maxchild; | 503 | int maxchild; |
504 | struct usb_device *children[USB_MAXCHILDREN]; | 504 | struct usb_device **children; |
505 | 505 | ||
506 | u32 quirks; | 506 | u32 quirks; |
507 | atomic_t urbnum; | 507 | atomic_t urbnum; |