提交 d4a75371 编写于 作者: M mochel@digitalimplant.org 提交者: Greg Kroah-Hartman

[PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists that will go away.

Signed-off-by: NPatrick Mochel <mochel@digitalimplant.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>

Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================
上级 8b0c250b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册