aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-22 17:21:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:47 -0400
commit93562b537659fc0f63920fd4d9d24f54e434f4c4 (patch)
tree6b7678f91af838f0c1fb85105b68b6c7f7e027e0 /drivers/ieee1394/nodemgr.c
parent4e10673944a5c386378ff9d692ae37e19993f9d5 (diff)
Driver Core: add ability for class_for_each_device to start in middle of list
This mirrors the functionality that driver_for_each_device has as well. We add a start variable, and all callers of the function are fixed up at the same time. The block layer will be using this new functionality in a follow-on patch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 05710c7c1220..47c0d85e0f32 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1453,7 +1453,8 @@ static void nodemgr_suspend_ne(struct node_entry *ne)
1453 ne->in_limbo = 1; 1453 ne->in_limbo = 1;
1454 WARN_ON(device_create_file(&ne->device, &dev_attr_ne_in_limbo)); 1454 WARN_ON(device_create_file(&ne->device, &dev_attr_ne_in_limbo));
1455 1455
1456 class_for_each_device(&nodemgr_ud_class, ne, __nodemgr_driver_suspend); 1456 class_for_each_device(&nodemgr_ud_class, NULL, ne,
1457 __nodemgr_driver_suspend);
1457} 1458}
1458 1459
1459 1460
@@ -1462,7 +1463,8 @@ static void nodemgr_resume_ne(struct node_entry *ne)
1462 ne->in_limbo = 0; 1463 ne->in_limbo = 0;
1463 device_remove_file(&ne->device, &dev_attr_ne_in_limbo); 1464 device_remove_file(&ne->device, &dev_attr_ne_in_limbo);
1464 1465
1465 class_for_each_device(&nodemgr_ud_class, ne, __nodemgr_driver_resume); 1466 class_for_each_device(&nodemgr_ud_class, NULL, ne,
1467 __nodemgr_driver_resume);
1466 HPSB_DEBUG("Node resumed: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]", 1468 HPSB_DEBUG("Node resumed: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]",
1467 NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid); 1469 NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid);
1468} 1470}
@@ -1498,7 +1500,8 @@ static int __nodemgr_update_pdrv(struct device *dev, void *data)
1498 1500
1499static void nodemgr_update_pdrv(struct node_entry *ne) 1501static void nodemgr_update_pdrv(struct node_entry *ne)
1500{ 1502{
1501 class_for_each_device(&nodemgr_ud_class, ne, __nodemgr_update_pdrv); 1503 class_for_each_device(&nodemgr_ud_class, NULL, ne,
1504 __nodemgr_update_pdrv);
1502} 1505}
1503 1506
1504 1507
@@ -1591,7 +1594,8 @@ static void nodemgr_node_probe(struct host_info *hi, int generation)
1591 * while probes are time-consuming. (Well, those probes need some 1594 * while probes are time-consuming. (Well, those probes need some
1592 * improvement...) */ 1595 * improvement...) */
1593 1596
1594 class_for_each_device(&nodemgr_ne_class, &param, __nodemgr_node_probe); 1597 class_for_each_device(&nodemgr_ne_class, NULL, &param,
1598 __nodemgr_node_probe);
1595 1599
1596 /* If we had a bus reset while we were scanning the bus, it is 1600 /* If we had a bus reset while we were scanning the bus, it is
1597 * possible that we did not probe all nodes. In that case, we 1601 * possible that we did not probe all nodes. In that case, we
@@ -1826,7 +1830,7 @@ int nodemgr_for_each_host(void *data, int (*cb)(struct hpsb_host *, void *))
1826 1830
1827 hip.cb = cb; 1831 hip.cb = cb;
1828 hip.data = data; 1832 hip.data = data;
1829 error = class_for_each_device(&hpsb_host_class, &hip, 1833 error = class_for_each_device(&hpsb_host_class, NULL, &hip,
1830 __nodemgr_for_each_host); 1834 __nodemgr_for_each_host);
1831 1835
1832 return error; 1836 return error;