diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-07-30 11:31:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-13 20:32:50 -0400 |
commit | 1a21175a615ed346e8043f5e9d60a672266b84b4 (patch) | |
tree | 9f0a4305c335d06feada41e7ab0697f9509e843d | |
parent | 0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c (diff) |
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 <stern@rowland.harvard.edu>
Tested-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/core/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 586d6f1376cf..286b4431a097 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) | |||
1091 | continue; | 1091 | continue; |
1092 | dev_dbg(&dev->dev, "unregistering interface %s\n", | 1092 | dev_dbg(&dev->dev, "unregistering interface %s\n", |
1093 | dev_name(&interface->dev)); | 1093 | dev_name(&interface->dev)); |
1094 | device_del(&interface->dev); | ||
1095 | usb_remove_sysfs_intf_files(interface); | 1094 | usb_remove_sysfs_intf_files(interface); |
1095 | device_del(&interface->dev); | ||
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | /* Now that the interfaces are unbound, nobody should | 1098 | /* Now that the interfaces are unbound, nobody should |