aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2012-11-19 10:56:09 +0000
committerImre Kaloz <kaloz@openwrt.org>2012-11-19 10:56:09 +0000
commit9544bd9e127d58b4ab0a4a200041666ddfe1522c (patch)
treecbc2c506ed5709184e6034a3d3be24318b46a99f /target/linux/generic
parent9f3fcfae178c909a28ed450d655898d4d78bea1d (diff)
downloadupstream-9544bd9e127d58b4ab0a4a200041666ddfe1522c.tar.gz
upstream-9544bd9e127d58b4ab0a4a200041666ddfe1522c.tar.bz2
upstream-9544bd9e127d58b4ab0a4a200041666ddfe1522c.zip
[generic/3.7]: fix 820-usb_add_usb_find_device_by_name.patch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34254 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/patches-3.7/820-usb_add_usb_find_device_by_name.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/generic/patches-3.7/820-usb_add_usb_find_device_by_name.patch b/target/linux/generic/patches-3.7/820-usb_add_usb_find_device_by_name.patch
index dc90e75b8c..c77ebd11ca 100644
--- a/target/linux/generic/patches-3.7/820-usb_add_usb_find_device_by_name.patch
+++ b/target/linux/generic/patches-3.7/820-usb_add_usb_find_device_by_name.patch
@@ -8,6 +8,7 @@
+ const char *name)
+{
+ struct usb_device *ret_dev = NULL;
++ struct usb_device *childdev = NULL;
+ int child;
+
+ dev_dbg(&dev->dev, "check for name %s ...\n", name);
@@ -18,13 +19,12 @@
+ ret_dev = usb_get_dev(dev);
+ goto exit;
+ }
-+
+ /* look through all of the children of this device */
-+ for (child = 0; child < dev->maxchild; ++child) {
-+ if (dev->children[child]) {
-+ usb_lock_device(dev->children[child]);
-+ ret_dev = match_device_name(dev->children[child], name);
-+ usb_unlock_device(dev->children[child]);
++ usb_hub_for_each_child(dev, child, childdev) {
++ if (childdev) {
++ usb_lock_device(childdev);
++ ret_dev = match_device_name(childdev, name);
++ usb_unlock_device(childdev);
+ if (ret_dev)
+ goto exit;
+ }