From: mochel@digitalimplant.org Date: Thu, 24 Mar 2005 21:00:16 +0000 (-0800) Subject: [PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4a7537122fa47a6ce41c5fdab53d844c78d7023;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists that will go away. Signed-off-by: Patrick Mochel Signed-off-by: Greg Kroah-Hartman Index: gregkh-2.6/drivers/usb/core/usb.c =================================================================== --- diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 4453cce7eb24..a64974397e8e 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -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;