Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================
/* if interface was already added, bind now; else let
* the future device_add() bind it, bypassing probe()
*/
- if (!list_empty (&dev->bus_list))
+ if (!klist_node_attached (&dev->knode_bus))
device_bind_driver(dev);
return 0;
return;
/* don't disconnect from disconnect(), or before dev_add() */
- if (!list_empty (&dev->driver_list) && !list_empty (&dev->bus_list))
+ if (!klist_node_attached(&dev->knode_driver) && !klist_node_attached(&dev->knode_bus))
device_release_driver(dev);
dev->driver = NULL;