diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/message.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 4f33eb632a88..82239f27c4cc 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -2006,6 +2006,13 @@ free_interfaces: for (i = 0; i < nintf; ++i) { struct usb_interface *intf = cp->interface[i]; + if (intf->dev.of_node && + !of_device_is_available(intf->dev.of_node)) { + dev_info(&dev->dev, "skipping disabled interface %d\n", + intf->cur_altsetting->desc.bInterfaceNumber); + continue; + } + dev_dbg(&dev->dev, "adding %s (config #%d, interface %d)\n", dev_name(&intf->dev), configuration, |