powerpc/mpic: Search for open-pic device-tree node if NULL

Almost all PowerPC platforms use a standard "open-pic" device node so
the mpic_alloc() function now accepts NULL for the device-node.  This
will cause it to perform a default search with of_find_matching_node().

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Kyle Moffett
2011-12-02 06:28:02 +00:00
committed by Benjamin Herrenschmidt
parent e7a98675ca
commit 996983b75c
23 changed files with 58 additions and 244 deletions

View File

@@ -54,24 +54,10 @@ static int sbc_rev;
static void __init sbc8548_pic_init(void)
{
struct mpic *mpic;
struct device_node *np = NULL;
np = of_find_node_by_type(np, "open-pic");
if (np == NULL) {
printk(KERN_ERR "Could not find open-pic node\n");
return;
}
mpic = mpic_alloc(np, 0,
struct mpic *mpic = mpic_alloc(NULL, 0,
MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
0, 256, " OpenPIC ");
BUG_ON(mpic == NULL);
/* Return the mpic node */
of_node_put(np);
mpic_init(mpic);
}