sh: r7780rp: Kill off unneded ifdefs for irq setup.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 25 Apr 2008 08:58:21 +0000 (17:58 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 8 May 2008 10:51:44 +0000 (19:51 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
arch/sh/boards/renesas/r7780rp/irq-r7780rp.c
arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
arch/sh/boards/renesas/r7780rp/setup.c
include/asm-sh/r7780rp.h

index 68f0ad1..ae1cfcb 100644 (file)
@@ -62,7 +62,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors,
                         NULL, mask_registers, NULL, NULL);
 
-unsigned char * __init highlander_init_irq_r7780mp(void)
+unsigned char * __init highlander_plat_irq_setup(void)
 {
        if ((ctrl_inw(0xa4000700) & 0xf000) == 0x2000) {
                printk(KERN_INFO "Using r7780mp interrupt controller.\n");
index bd34048..9d3921f 100644 (file)
@@ -55,7 +55,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors,
                         NULL, mask_registers, NULL, NULL);
 
-unsigned char * __init highlander_init_irq_r7780rp(void)
+unsigned char * __init highlander_plat_irq_setup(void)
 {
        if (ctrl_inw(0xa5000600)) {
                printk(KERN_INFO "Using r7780rp interrupt controller.\n");
index bf7ec10..896c045 100644 (file)
@@ -64,7 +64,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors,
                         NULL, mask_registers, NULL, NULL);
 
-unsigned char * __init highlander_init_irq_r7785rp(void)
+unsigned char * __init highlander_plat_irq_setup(void)
 {
        if ((ctrl_inw(0xa4000158) & 0xf000) != 0x1000)
                return NULL;
index ac0a965..bc79afb 100644 (file)
@@ -316,7 +316,7 @@ static void __init highlander_setup(char **cmdline_p)
 
 static unsigned char irl2irq[HL_NR_IRL];
 
-int highlander_irq_demux(int irq)
+static int highlander_irq_demux(int irq)
 {
        if (irq >= HL_NR_IRL || !irl2irq[irq])
                return irq;
@@ -324,27 +324,9 @@ int highlander_irq_demux(int irq)
        return irl2irq[irq];
 }
 
-void __init highlander_init_irq(void)
+static void __init highlander_init_irq(void)
 {
-       unsigned char *ucp = NULL;
-
-       do {
-#ifdef CONFIG_SH_R7780MP
-               ucp = highlander_init_irq_r7780mp();
-               if (ucp)
-                       break;
-#endif
-#ifdef CONFIG_SH_R7785RP
-               ucp = highlander_init_irq_r7785rp();
-               if (ucp)
-                       break;
-#endif
-#ifdef CONFIG_SH_R7780RP
-               ucp = highlander_init_irq_r7780rp();
-               if (ucp)
-                       break;
-#endif
-       } while (0);
+       unsigned char *ucp = highlander_plat_irq_setup();
 
        if (ucp) {
                plat_irq_setup_pins(IRQ_MODE_IRL3210);
index a33838f..306f735 100644 (file)
 #define IRQ_SCIF0              (HL_FPGA_IRQ_BASE + 15)
 #define IRQ_SCIF1              (HL_FPGA_IRQ_BASE + 16)
 
-unsigned char *highlander_init_irq_r7780mp(void);
-unsigned char *highlander_init_irq_r7780rp(void);
-unsigned char *highlander_init_irq_r7785rp(void);
+unsigned char *highlander_plat_irq_setup(void);
 
 #endif  /* __ASM_SH_RENESAS_R7780RP */