mirror of https://github.com/hak5/openwrt.git
parent
4fa5781a95
commit
4c043300fc
|
@ -8,6 +8,7 @@
|
||||||
+ const char *name)
|
+ const char *name)
|
||||||
+{
|
+{
|
||||||
+ struct usb_device *ret_dev = NULL;
|
+ struct usb_device *ret_dev = NULL;
|
||||||
|
+ struct usb_device *childdev = NULL;
|
||||||
+ int child;
|
+ int child;
|
||||||
+
|
+
|
||||||
+ dev_dbg(&dev->dev, "check for name %s ...\n", name);
|
+ dev_dbg(&dev->dev, "check for name %s ...\n", name);
|
||||||
|
@ -18,13 +19,12 @@
|
||||||
+ ret_dev = usb_get_dev(dev);
|
+ ret_dev = usb_get_dev(dev);
|
||||||
+ goto exit;
|
+ goto exit;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
+ /* look through all of the children of this device */
|
+ /* look through all of the children of this device */
|
||||||
+ for (child = 0; child < dev->maxchild; ++child) {
|
+ usb_hub_for_each_child(dev, child, childdev) {
|
||||||
+ if (dev->children[child]) {
|
+ if (childdev) {
|
||||||
+ usb_lock_device(dev->children[child]);
|
+ usb_lock_device(childdev);
|
||||||
+ ret_dev = match_device_name(dev->children[child], name);
|
+ ret_dev = match_device_name(childdev, name);
|
||||||
+ usb_unlock_device(dev->children[child]);
|
+ usb_unlock_device(childdev);
|
||||||
+ if (ret_dev)
|
+ if (ret_dev)
|
||||||
+ goto exit;
|
+ goto exit;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in New Issue