diff options
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/message.c | 1 | ||||
| -rw-r--r-- | drivers/usb/core/sysfs.c | 2 | ||||
| -rw-r--r-- | drivers/usb/core/urb.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 887738577b28..6d1048faf08e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
| @@ -1091,6 +1091,7 @@ 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 | interface->unregistering = 1; | ||
| 1094 | usb_remove_sysfs_intf_files(interface); | 1095 | usb_remove_sysfs_intf_files(interface); |
| 1095 | device_del(&interface->dev); | 1096 | device_del(&interface->dev); |
| 1096 | } | 1097 | } |
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index f66fba11fbd5..4fb65fdc9dc3 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
| @@ -840,7 +840,7 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) | |||
| 840 | struct usb_host_interface *alt = intf->cur_altsetting; | 840 | struct usb_host_interface *alt = intf->cur_altsetting; |
| 841 | int retval; | 841 | int retval; |
| 842 | 842 | ||
| 843 | if (intf->sysfs_files_created) | 843 | if (intf->sysfs_files_created || intf->unregistering) |
| 844 | return 0; | 844 | return 0; |
| 845 | 845 | ||
| 846 | /* The interface string may be present in some altsettings | 846 | /* The interface string may be present in some altsettings |
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 4342bd9c3bb6..1f68af9db3f7 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c | |||
| @@ -85,8 +85,8 @@ EXPORT_SYMBOL_GPL(usb_alloc_urb); | |||
| 85 | * Must be called when a user of a urb is finished with it. When the last user | 85 | * Must be called when a user of a urb is finished with it. When the last user |
| 86 | * of the urb calls this function, the memory of the urb is freed. | 86 | * of the urb calls this function, the memory of the urb is freed. |
| 87 | * | 87 | * |
| 88 | * Note: The transfer buffer associated with the urb is not freed, that must be | 88 | * Note: The transfer buffer associated with the urb is not freed unless the |
| 89 | * done elsewhere. | 89 | * URB_FREE_BUFFER transfer flag is set. |
| 90 | */ | 90 | */ |
| 91 | void usb_free_urb(struct urb *urb) | 91 | void usb_free_urb(struct urb *urb) |
| 92 | { | 92 | { |
