diff options
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 087af73a59dd..7d131509e419 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -303,7 +303,7 @@ int usb_driver_claim_interface(struct usb_driver *driver, | |||
303 | /* if interface was already added, bind now; else let | 303 | /* if interface was already added, bind now; else let |
304 | * the future device_add() bind it, bypassing probe() | 304 | * the future device_add() bind it, bypassing probe() |
305 | */ | 305 | */ |
306 | if (klist_node_attached(&dev->knode_bus)) | 306 | if (device_is_registered(dev)) |
307 | device_bind_driver(dev); | 307 | device_bind_driver(dev); |
308 | 308 | ||
309 | return 0; | 309 | return 0; |
@@ -336,8 +336,8 @@ void usb_driver_release_interface(struct usb_driver *driver, | |||
336 | if (iface->condition != USB_INTERFACE_BOUND) | 336 | if (iface->condition != USB_INTERFACE_BOUND) |
337 | return; | 337 | return; |
338 | 338 | ||
339 | /* release only after device_add() */ | 339 | /* don't release if the interface hasn't been added yet */ |
340 | if (klist_node_attached(&dev->knode_bus)) { | 340 | if (device_is_registered(dev)) { |
341 | iface->condition = USB_INTERFACE_UNBINDING; | 341 | iface->condition = USB_INTERFACE_UNBINDING; |
342 | device_release_driver(dev); | 342 | device_release_driver(dev); |
343 | } | 343 | } |