From: Alan Stern Date: Wed, 30 Jul 2008 15:31:50 +0000 (-0400) Subject: USB: fix interface unregistration logic X-Git-Tag: v2.6.27-rc4~101^2~36 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1a21175a615ed346e8043f5e9d60a672266b84b4;p=linux-2.6-omap-h63xx.git USB: fix interface unregistration logic 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 Tested-by: Kay Sievers Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 586d6f1376c..286b4431a09 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1091,8 +1091,8 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) continue; dev_dbg(&dev->dev, "unregistering interface %s\n", dev_name(&interface->dev)); - device_del(&interface->dev); usb_remove_sysfs_intf_files(interface); + device_del(&interface->dev); } /* Now that the interfaces are unbound, nobody should