diff --git a/sys/powerpc/powermac/openpic_macio.c b/sys/powerpc/powermac/openpic_macio.c index 832a04340e7f..76421906ec84 100644 --- a/sys/powerpc/powermac/openpic_macio.c +++ b/sys/powerpc/powermac/openpic_macio.c @@ -114,16 +114,15 @@ static void openpic_ofw_identify(driver_t *driver, device_t parent) { device_t child; - phandle_t chosen, pic; + phandle_t pic; char type[40]; - chosen = OF_finddevice("/chosen"); - if (chosen == -1) + pic = OF_finddevice("mpic"); + if (pic == -1) { + printf("could not find mpic!\n"); return; + } - if (OF_getprop(chosen, "interrupt-controller", &pic, 4) != 4) - return; - OF_getprop(pic, "device_type", type, sizeof(type)); if (strcmp(type, "open-pic") != 0)