diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c --- a/sys/dev/ofw/ofw_cpu.c +++ b/sys/dev/ofw/ofw_cpu.c @@ -89,10 +89,10 @@ DRIVER_MODULE(ofw_cpulist, ofwbus, ofw_cpulist_driver, 0, 0); -static int -ofw_cpulist_probe(device_t dev) +static int +ofw_cpulist_probe(device_t dev) { - const char *name; + const char *name; name = ofw_bus_get_name(dev); @@ -104,8 +104,8 @@ return (0); } -static int -ofw_cpulist_attach(device_t dev) +static int +ofw_cpulist_attach(device_t dev) { struct ofw_cpulist_softc *sc; phandle_t root, child; @@ -122,18 +122,18 @@ for (child = OF_child(root); child != 0; child = OF_peer(child)) { dinfo = malloc(sizeof(*dinfo), M_OFWCPU, M_WAITOK | M_ZERO); - if (ofw_bus_gen_setup_devinfo(dinfo, child) != 0) { - free(dinfo, M_OFWCPU); - continue; - } - cdev = device_add_child(dev, NULL, -1); - if (cdev == NULL) { - device_printf(dev, "<%s>: device_add_child failed\n", - dinfo->obd_name); - ofw_bus_gen_destroy_devinfo(dinfo); - free(dinfo, M_OFWCPU); - continue; - } + if (ofw_bus_gen_setup_devinfo(dinfo, child) != 0) { + free(dinfo, M_OFWCPU); + continue; + } + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + dinfo->obd_name); + ofw_bus_gen_destroy_devinfo(dinfo); + free(dinfo, M_OFWCPU); + continue; + } device_set_ivars(cdev, dinfo); } @@ -141,9 +141,9 @@ } static const struct ofw_bus_devinfo * -ofw_cpulist_get_devinfo(device_t dev, device_t child) +ofw_cpulist_get_devinfo(device_t dev, device_t child) { - return (device_get_ivars(child)); + return (device_get_ivars(child)); } static int ofw_cpu_probe(device_t); @@ -242,8 +242,8 @@ struct cpuref cpuref; cell_t *servers; int i, nservers, rv; - - if ((nservers = OF_getencprop_alloc(node, + + if ((nservers = OF_getencprop_alloc(node, "ibm,ppc-interrupt-server#s", (void **)&servers)) < 0) return (ENXIO); nservers /= sizeof(cell_t);