]> err.no Git - linux-2.6/commitdiff
[PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists...
authormochel@digitalimplant.org <mochel@digitalimplant.org>
Thu, 24 Mar 2005 21:00:16 +0000 (13:00 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jun 2005 22:15:17 +0000 (15:15 -0700)
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
===================================================================

drivers/usb/core/usb.c

index 4453cce7eb2435cb8c8f537bff2f78bfc4c54d9a..a64974397e8e0023576fd387f667053e254c6296 100644 (file)
@@ -293,7 +293,7 @@ int usb_driver_claim_interface(struct usb_driver *driver,
        /* 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;
@@ -323,7 +323,7 @@ void usb_driver_release_interface(struct usb_driver *driver,
                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;