aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/powermac/macio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/powermac/macio.c')
-rw-r--r--sys/powerpc/powermac/macio.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c
index 71be1136ccc7..5c17925d5f0f 100644
--- a/sys/powerpc/powermac/macio.c
+++ b/sys/powerpc/powermac/macio.c
@@ -185,7 +185,6 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo)
{
int *intr;
int i, nintr;
- phandle_t iparent;
int icells;
if (dinfo->mdi_ninterrupts >= 6) {
@@ -193,10 +192,9 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo)
return;
}
- icells = 1;
-
- if (OF_getprop(devnode, "interrupt-parent", &iparent, sizeof(iparent)) == sizeof(iparent))
- OF_getprop(iparent, "#interrupt-cells", &icells, sizeof(icells));
+ if (OF_searchprop(devnode, "#interrupt-cells", &icells, sizeof(icells))
+ <= 0)
+ icells = 1;
nintr = OF_getprop_alloc(devnode, "interrupts", sizeof(*intr),
(void **)&intr);