]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: fix interface unregistration logic
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 14 Aug 2008 03:55:09 +0000 (03:55 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:05:01 +0000 (11:05 -0700)
commit 1a21175a615ed346e8043f5e9d60a672266b84b4 upstream

This patch (as1122) fixes a bug: When an interface is unregistered,
its children (sysfs files and endpoint devices) are unregistered after
it instead of before.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/message.c

index fe47d145255ae95f248dbe6825c9abc7836e1bb8..2fdbc10ddfc1d3161f3f7a4c5cd43d0859599234 100644 (file)
@@ -1091,8 +1091,8 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
                                continue;
                        dev_dbg(&dev->dev, "unregistering interface %s\n",
                                interface->dev.bus_id);
-                       device_del(&interface->dev);
                        usb_remove_sysfs_intf_files(interface);
+                       device_del(&interface->dev);
                }
 
                /* Now that the interfaces are unbound, nobody should