aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx/mpc85xx_ads.c
diff options
context:
space:
mode:
authorKyle Moffett <Kyle.D.Moffett@boeing.com>2011-12-02 01:28:02 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-06 21:43:07 -0500
commit996983b75cebb1bc1c2c545f20336f24ebfa17af (patch)
treeba137847233819cf043ef441420cf6e134ba557c /arch/powerpc/platforms/85xx/mpc85xx_ads.c
parente7a98675caf272a11dc1012c7a8c6c00cab09f5b (diff)
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>
Diffstat (limited to 'arch/powerpc/platforms/85xx/mpc85xx_ads.c')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 4c1e9b67ac53..17c6f06e2d41 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -50,21 +50,10 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
50 50
51static void __init mpc85xx_ads_pic_init(void) 51static void __init mpc85xx_ads_pic_init(void)
52{ 52{
53 struct mpic *mpic; 53 struct mpic *mpic = mpic_alloc(NULL, 0,
54 struct device_node *np = NULL;
55
56 np = of_find_node_by_type(np, "open-pic");
57 if (!np) {
58 printk(KERN_ERR "Could not find open-pic node\n");
59 return;
60 }
61
62 mpic = mpic_alloc(np, 0,
63 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 54 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
64 0, 256, " OpenPIC "); 55 0, 256, " OpenPIC ");
65 BUG_ON(mpic == NULL); 56 BUG_ON(mpic == NULL);
66 of_node_put(np);
67
68 mpic_init(mpic); 57 mpic_init(mpic);
69 58
70 mpc85xx_cpm2_pic_init(); 59 mpc85xx_cpm2_pic_init();