[PATCH] Use device_for_each_child() to unregister devices in nodemgr_remove_host_dev()
Signed-off-by: Greg Kroah-Hartman <[email protected]>
diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
---
commit 64360322ab3330d4881166380ad43a1eec2f123d
tree cfb876990acbe4669e9ba45d6252c75538288f24
parent ff710710eae73990dd484ea8e37dba636452502b
author [email protected] <[email protected]> Fri, 25 Mar 2005 11:45:31 -0800
committer Greg Kroah-Hartman <[email protected]> Mon, 20 Jun 2005 15:15:26 -0700
drivers/ieee1394/nodemgr.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -695,14 +695,15 @@ static void nodemgr_remove_ne(struct nod
put_device(dev);
}
+static int __nodemgr_remove_host_dev(struct device *dev, void *data)
+{
+ nodemgr_remove_ne(container_of(dev, struct node_entry, device));
+ return 0;
+}
static void nodemgr_remove_host_dev(struct device *dev)
{
- struct device *ne_dev, *next;
-
- list_for_each_entry_safe(ne_dev, next, &dev->children, node)
- nodemgr_remove_ne(container_of(ne_dev, struct node_entry, device));
-
+ device_for_each_child(dev, NULL, __nodemgr_remove_host_dev);
sysfs_remove_link(&dev->kobj, "irm_id");
sysfs_remove_link(&dev->kobj, "busmgr_id");
sysfs_remove_link(&dev->kobj, "host_id");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]