Commit a712b65c authored by Kumar Gala's avatar Kumar Gala

powerpc/85xx: minor fixes for MPC85xx DS board port

These issues were reported by Stephen Rothwell for another 85xx board
port and pointed out by Chen Gong as issues in the DS port.

* mpic OF node reference counting was off
* of_device_id struct should be marked as __initdata
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 5e82eb33
...@@ -58,14 +58,13 @@ void __init mpc85xx_ds_pic_init(void) ...@@ -58,14 +58,13 @@ void __init mpc85xx_ds_pic_init(void)
{ {
struct mpic *mpic; struct mpic *mpic;
struct resource r; struct resource r;
struct device_node *np = NULL; struct device_node *np;
#ifdef CONFIG_PPC_I8259 #ifdef CONFIG_PPC_I8259
struct device_node *cascade_node = NULL; struct device_node *cascade_node = NULL;
int cascade_irq; int cascade_irq;
#endif #endif
np = of_find_node_by_type(np, "open-pic"); np = of_find_node_by_type(np, "open-pic");
if (np == NULL) { if (np == NULL) {
printk(KERN_ERR "Could not find open-pic node\n"); printk(KERN_ERR "Could not find open-pic node\n");
return; return;
...@@ -82,6 +81,7 @@ void __init mpc85xx_ds_pic_init(void) ...@@ -82,6 +81,7 @@ void __init mpc85xx_ds_pic_init(void)
MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
0, 256, " OpenPIC "); 0, 256, " OpenPIC ");
BUG_ON(mpic == NULL); BUG_ON(mpic == NULL);
of_node_put(np);
mpic_init(mpic); mpic_init(mpic);
...@@ -185,7 +185,7 @@ static int __init mpc8544_ds_probe(void) ...@@ -185,7 +185,7 @@ static int __init mpc8544_ds_probe(void)
} }
} }
static struct of_device_id mpc85xxds_ids[] = { static struct of_device_id __initdata mpc85xxds_ids[] = {
{ .type = "soc", }, { .type = "soc", },
{ .compatible = "soc", }, { .compatible = "soc", },
{}, {},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment