lkml.org 
[lkml]   [2005]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[4/12] More Driver Model Locking Changes

ChangeSet@1.2242, 2005-03-24 13:00:16-08:00, mochel@digitalimplant.org
[usb] 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>

diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c 2005-03-24 20:33:38 -08:00
+++ b/drivers/usb/core/usb.c 2005-03-24 20:33:38 -08:00
@@ -300,7 +300,7 @@
/* 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;
@@ -330,7 +330,7 @@
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.053 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site