[POWERPC] 85xx: mpc85xx_ads: add in missing of_node_put()
Add in missing of_node_put() after cpm2_pic_init(). This and other coding style cleanups as suggested by Stephen Rothwell. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
d7584ed2b9
commit
e5091842dc
|
@ -52,9 +52,9 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int cascade_irq;
|
int cascade_irq;
|
||||||
|
|
||||||
while ((cascade_irq = cpm2_get_irq()) >= 0) {
|
while ((cascade_irq = cpm2_get_irq()) >= 0)
|
||||||
generic_handle_irq(cascade_irq);
|
generic_handle_irq(cascade_irq);
|
||||||
}
|
|
||||||
desc->chip->eoi(irq);
|
desc->chip->eoi(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,13 +70,12 @@ static void __init mpc85xx_ads_pic_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
np = of_find_node_by_type(np, "open-pic");
|
np = of_find_node_by_type(np, "open-pic");
|
||||||
|
if (!np) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(of_address_to_resource(np, 0, &r)) {
|
if (of_address_to_resource(np, 0, &r)) {
|
||||||
printk(KERN_ERR "Could not map mpic register space\n");
|
printk(KERN_ERR "Could not map mpic register space\n");
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
return;
|
return;
|
||||||
|
@ -100,6 +99,7 @@ static void __init mpc85xx_ads_pic_init(void)
|
||||||
irq = irq_of_parse_and_map(np, 0);
|
irq = irq_of_parse_and_map(np, 0);
|
||||||
|
|
||||||
cpm2_pic_init(np);
|
cpm2_pic_init(np);
|
||||||
|
of_node_put(np);
|
||||||
set_irq_chained_handler(irq, cpm2_cascade);
|
set_irq_chained_handler(irq, cpm2_cascade);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ struct cpm_pin {
|
||||||
int port, pin, flags;
|
int port, pin, flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct cpm_pin mpc8560_ads_pins[] = {
|
static const struct cpm_pin mpc8560_ads_pins[] = {
|
||||||
/* SCC1 */
|
/* SCC1 */
|
||||||
{3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
|
{3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
|
||||||
{3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
|
{3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
|
||||||
|
|
Loading…
Reference in New Issue