ofw: remove redundant calls in ofwbus_attach()
Since commit ecaecbc7d8, calling
ofw_bus_gen_setup_devinfo() is redundant, as the call to
device_set_ivars() now happens inside simplebus_add_device().
Reviewed by: markj
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D40271
This commit is contained in:
@@ -102,7 +102,6 @@ static int
|
||||
ofwbus_attach(device_t dev)
|
||||
{
|
||||
phandle_t node;
|
||||
struct ofw_bus_devinfo obd;
|
||||
|
||||
node = OF_peer(0);
|
||||
|
||||
@@ -126,12 +125,9 @@ ofwbus_attach(device_t dev)
|
||||
/*
|
||||
* Now walk the OFW tree and attach top-level devices.
|
||||
*/
|
||||
for (node = OF_child(node); node > 0; node = OF_peer(node)) {
|
||||
if (ofw_bus_gen_setup_devinfo(&obd, node) != 0)
|
||||
continue;
|
||||
for (node = OF_child(node); node > 0; node = OF_peer(node))
|
||||
simplebus_add_device(dev, node, 0, NULL, -1, NULL);
|
||||
ofw_bus_gen_destroy_devinfo(&obd);
|
||||
}
|
||||
|
||||
return (bus_generic_attach(dev));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user