Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iicbus/ofw_iicbus.c
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | for (child = OF_child(node); child != 0; child = OF_peer(child)) { | ||||
if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != | if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != | ||||
0) { | 0) { | ||||
free(dinfo, M_DEVBUF); | free(dinfo, M_DEVBUF); | ||||
continue; | continue; | ||||
} | } | ||||
childdev = device_add_child(dev, NULL, -1); | childdev = device_add_child(dev, NULL, -1); | ||||
resource_list_init(&dinfo->opd_dinfo.rl); | resource_list_init(&dinfo->opd_dinfo.rl); | ||||
#ifndef INTRNG | |||||
ofw_bus_intr_to_rl(childdev, child, | ofw_bus_intr_to_rl(childdev, child, | ||||
&dinfo->opd_dinfo.rl, NULL); | &dinfo->opd_dinfo.rl, NULL); | ||||
#endif | |||||
device_set_ivars(childdev, dinfo); | device_set_ivars(childdev, dinfo); | ||||
} | } | ||||
/* Register bus */ | /* Register bus */ | ||||
OF_device_register_xref(OF_xref_from_node(node), dev); | OF_device_register_xref(OF_xref_from_node(node), dev); | ||||
return (bus_generic_attach(dev)); | return (bus_generic_attach(dev)); | ||||
} | } | ||||
Show All 39 Lines |