mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 01:54:00 +00:00
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: additional regression fix for device removal
This commit is contained in:
commit
90c69064c9
@ -1147,6 +1147,14 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
|
|||||||
* any drivers bound to them (a key side effect)
|
* any drivers bound to them (a key side effect)
|
||||||
*/
|
*/
|
||||||
if (dev->actconfig) {
|
if (dev->actconfig) {
|
||||||
|
/*
|
||||||
|
* FIXME: In order to avoid self-deadlock involving the
|
||||||
|
* bandwidth_mutex, we have to mark all the interfaces
|
||||||
|
* before unregistering any of them.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++)
|
||||||
|
dev->actconfig->interface[i]->unregistering = 1;
|
||||||
|
|
||||||
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
|
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
|
||||||
struct usb_interface *interface;
|
struct usb_interface *interface;
|
||||||
|
|
||||||
@ -1156,7 +1164,6 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
|
|||||||
continue;
|
continue;
|
||||||
dev_dbg(&dev->dev, "unregistering interface %s\n",
|
dev_dbg(&dev->dev, "unregistering interface %s\n",
|
||||||
dev_name(&interface->dev));
|
dev_name(&interface->dev));
|
||||||
interface->unregistering = 1;
|
|
||||||
remove_intf_ep_devs(interface);
|
remove_intf_ep_devs(interface);
|
||||||
device_del(&interface->dev);
|
device_del(&interface->dev);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user