diff options
author | mochel@digitalimplant.org <mochel@digitalimplant.org> | 2005-03-24 16:00:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:17 -0400 |
commit | d4a7537122fa47a6ce41c5fdab53d844c78d7023 (patch) | |
tree | e4ae3e20f27497c90fca268260c591f117356a3e /drivers/usb | |
parent | 8b0c250be489dcbf1a3a33bb4ec4c7f33735a365 (diff) |
[PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists that will go away.
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
===================================================================
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
293 | /* if interface was already added, bind now; else let | 293 | /* if interface was already added, bind now; else let |
294 | * the future device_add() bind it, bypassing probe() | 294 | * the future device_add() bind it, bypassing probe() |
295 | */ | 295 | */ |
296 | if (!list_empty (&dev->bus_list)) | 296 | if (!klist_node_attached (&dev->knode_bus)) |
297 | device_bind_driver(dev); | 297 | device_bind_driver(dev); |
298 | 298 | ||
299 | return 0; | 299 | return 0; |
@@ -323,7 +323,7 @@ void usb_driver_release_interface(struct usb_driver *driver, | |||
323 | return; | 323 | return; |
324 | 324 | ||
325 | /* don't disconnect from disconnect(), or before dev_add() */ | 325 | /* don't disconnect from disconnect(), or before dev_add() */ |
326 | if (!list_empty (&dev->driver_list) && !list_empty (&dev->bus_list)) | 326 | if (!klist_node_attached(&dev->knode_driver) && !klist_node_attached(&dev->knode_bus)) |
327 | device_release_driver(dev); | 327 | device_release_driver(dev); |
328 | 328 | ||
329 | dev->driver = NULL; | 329 | dev->driver = NULL; |