diff options
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 15 | ||||
-rw-r--r-- | include/asm-powerpc/ipic.h | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 522aa14e8f0d..473c415e9e25 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -557,8 +557,7 @@ static struct irq_host_ops ipic_host_ops = { | |||
557 | .xlate = ipic_host_xlate, | 557 | .xlate = ipic_host_xlate, |
558 | }; | 558 | }; |
559 | 559 | ||
560 | void __init ipic_init(struct device_node *node, | 560 | struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) |
561 | unsigned int flags) | ||
562 | { | 561 | { |
563 | struct ipic *ipic; | 562 | struct ipic *ipic; |
564 | struct resource res; | 563 | struct resource res; |
@@ -566,7 +565,7 @@ void __init ipic_init(struct device_node *node, | |||
566 | 565 | ||
567 | ipic = alloc_bootmem(sizeof(struct ipic)); | 566 | ipic = alloc_bootmem(sizeof(struct ipic)); |
568 | if (ipic == NULL) | 567 | if (ipic == NULL) |
569 | return; | 568 | return NULL; |
570 | 569 | ||
571 | memset(ipic, 0, sizeof(struct ipic)); | 570 | memset(ipic, 0, sizeof(struct ipic)); |
572 | ipic->of_node = of_node_get(node); | 571 | ipic->of_node = of_node_get(node); |
@@ -576,12 +575,14 @@ void __init ipic_init(struct device_node *node, | |||
576 | &ipic_host_ops, 0); | 575 | &ipic_host_ops, 0); |
577 | if (ipic->irqhost == NULL) { | 576 | if (ipic->irqhost == NULL) { |
578 | of_node_put(node); | 577 | of_node_put(node); |
579 | return; | 578 | return NULL; |
580 | } | 579 | } |
581 | 580 | ||
582 | ret = of_address_to_resource(node, 0, &res); | 581 | ret = of_address_to_resource(node, 0, &res); |
583 | if (ret) | 582 | if (ret) { |
584 | return; | 583 | of_node_put(node); |
584 | return NULL; | ||
585 | } | ||
585 | 586 | ||
586 | ipic->regs = ioremap(res.start, res.end - res.start + 1); | 587 | ipic->regs = ioremap(res.start, res.end - res.start + 1); |
587 | 588 | ||
@@ -625,6 +626,8 @@ void __init ipic_init(struct device_node *node, | |||
625 | 626 | ||
626 | printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, | 627 | printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, |
627 | primary_ipic->regs); | 628 | primary_ipic->regs); |
629 | |||
630 | return ipic; | ||
628 | } | 631 | } |
629 | 632 | ||
630 | int ipic_set_priority(unsigned int virq, unsigned int priority) | 633 | int ipic_set_priority(unsigned int virq, unsigned int priority) |
diff --git a/include/asm-powerpc/ipic.h b/include/asm-powerpc/ipic.h index 9fbb03415860..edec79dcb7c1 100644 --- a/include/asm-powerpc/ipic.h +++ b/include/asm-powerpc/ipic.h | |||
@@ -78,7 +78,7 @@ extern u32 ipic_get_mcp_status(void); | |||
78 | extern void ipic_clear_mcp_status(u32 mask); | 78 | extern void ipic_clear_mcp_status(u32 mask); |
79 | 79 | ||
80 | #ifdef CONFIG_PPC_MERGE | 80 | #ifdef CONFIG_PPC_MERGE |
81 | extern void ipic_init(struct device_node *node, unsigned int flags); | 81 | extern struct ipic * ipic_init(struct device_node *node, unsigned int flags); |
82 | extern unsigned int ipic_get_irq(void); | 82 | extern unsigned int ipic_get_irq(void); |
83 | #else | 83 | #else |
84 | extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, | 84 | extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, |