]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/core/message.c
USB: don't register endpoints for interfaces that are going away
[linux-2.6-omap-h63xx.git] / drivers / usb / core / message.c
index 286b4431a0974195dc0ceffe74f351d18f1d7c68..6d1048faf08e1679597af0fadd6a5849d3afd299 100644 (file)
@@ -1091,6 +1091,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
                                continue;
                        dev_dbg(&dev->dev, "unregistering interface %s\n",
                                dev_name(&interface->dev));
+                       interface->unregistering = 1;
                        usb_remove_sysfs_intf_files(interface);
                        device_del(&interface->dev);
                }
@@ -1204,7 +1205,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
 
        alt = usb_altnum_to_altsetting(iface, alternate);
        if (!alt) {
-               warn("selecting invalid altsetting %d", alternate);
+               dev_warn(&dev->dev, "selecting invalid altsetting %d",
+                        alternate);
                return -EINVAL;
        }