aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-10-16 09:33:18 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:30 -0400
commit4b1135a277f4b38f60b9c9f28adae467feb07856 (patch)
tree7014a4a687220ebe66dacb6ba75d37610d8279f3
parent63d659d556f145d33798b8ad19ced10c254fe445 (diff)
genirq: fix name space collisions of nr_irqs in arch/*
local shadows of global variables are _bad_ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/alpha/kernel/sys_sable.c6
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c4
-rw-r--r--arch/arm/mach-omap2/irq.c8
-rw-r--r--arch/avr32/mach-at32ap/extint.c8
4 files changed, 13 insertions, 13 deletions
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index 99a7f19da13a..a4555f497639 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -47,7 +47,7 @@ typedef struct irq_swizzle_struct
47 47
48static irq_swizzle_t *sable_lynx_irq_swizzle; 48static irq_swizzle_t *sable_lynx_irq_swizzle;
49 49
50static void sable_lynx_init_irq(int nr_irqs); 50static void sable_lynx_init_irq(int nr_of_irqs);
51 51
52#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE) 52#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE)
53 53
@@ -530,11 +530,11 @@ sable_lynx_srm_device_interrupt(unsigned long vector)
530} 530}
531 531
532static void __init 532static void __init
533sable_lynx_init_irq(int nr_irqs) 533sable_lynx_init_irq(int nr_of_irqs)
534{ 534{
535 long i; 535 long i;
536 536
537 for (i = 0; i < nr_irqs; ++i) { 537 for (i = 0; i < nr_of_irqs; ++i) {
538 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 538 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
539 irq_desc[i].chip = &sable_lynx_irq_type; 539 irq_desc[i].chip = &sable_lynx_irq_type;
540 } 540 }
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index b0653a87159a..30451300751b 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -143,7 +143,7 @@ static struct irq_chip ixdp2x00_cpld_irq_chip = {
143 .unmask = ixdp2x00_irq_unmask 143 .unmask = ixdp2x00_irq_unmask
144}; 144};
145 145
146void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_irqs) 146void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs)
147{ 147{
148 unsigned int irq; 148 unsigned int irq;
149 149
@@ -154,7 +154,7 @@ void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigne
154 154
155 board_irq_stat = stat_reg; 155 board_irq_stat = stat_reg;
156 board_irq_mask = mask_reg; 156 board_irq_mask = mask_reg;
157 board_irq_count = nr_irqs; 157 board_irq_count = nr_of_irqs;
158 158
159 *board_irq_mask = 0xffffffff; 159 *board_irq_mask = 0xffffffff;
160 160
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 196a9565a8dc..003901f1e2da 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -111,7 +111,7 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
111 111
112void __init omap_init_irq(void) 112void __init omap_init_irq(void)
113{ 113{
114 unsigned long nr_irqs = 0; 114 unsigned long nr_of_irqs = 0;
115 unsigned int nr_banks = 0; 115 unsigned int nr_banks = 0;
116 int i; 116 int i;
117 117
@@ -124,14 +124,14 @@ void __init omap_init_irq(void)
124 124
125 omap_irq_bank_init_one(bank); 125 omap_irq_bank_init_one(bank);
126 126
127 nr_irqs += bank->nr_irqs; 127 nr_of_irqs += bank->nr_irqs;
128 nr_banks++; 128 nr_banks++;
129 } 129 }
130 130
131 printk(KERN_INFO "Total of %ld interrupts on %d active controller%s\n", 131 printk(KERN_INFO "Total of %ld interrupts on %d active controller%s\n",
132 nr_irqs, nr_banks, nr_banks > 1 ? "s" : ""); 132 nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
133 133
134 for (i = 0; i < nr_irqs; i++) { 134 for (i = 0; i < nr_of_irqs; i++) {
135 set_irq_chip(i, &omap_irq_chip); 135 set_irq_chip(i, &omap_irq_chip);
136 set_irq_handler(i, handle_level_irq); 136 set_irq_handler(i, handle_level_irq);
137 set_irq_flags(i, IRQF_VALID); 137 set_irq_flags(i, IRQF_VALID);
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index c36a6d59d6f0..310477ba1bbf 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -191,7 +191,7 @@ static int __init eic_probe(struct platform_device *pdev)
191 struct eic *eic; 191 struct eic *eic;
192 struct resource *regs; 192 struct resource *regs;
193 unsigned int i; 193 unsigned int i;
194 unsigned int nr_irqs; 194 unsigned int nr_of_irqs;
195 unsigned int int_irq; 195 unsigned int int_irq;
196 int ret; 196 int ret;
197 u32 pattern; 197 u32 pattern;
@@ -224,7 +224,7 @@ static int __init eic_probe(struct platform_device *pdev)
224 eic_writel(eic, IDR, ~0UL); 224 eic_writel(eic, IDR, ~0UL);
225 eic_writel(eic, MODE, ~0UL); 225 eic_writel(eic, MODE, ~0UL);
226 pattern = eic_readl(eic, MODE); 226 pattern = eic_readl(eic, MODE);
227 nr_irqs = fls(pattern); 227 nr_of_irqs = fls(pattern);
228 228
229 /* Trigger on low level unless overridden by driver */ 229 /* Trigger on low level unless overridden by driver */
230 eic_writel(eic, EDGE, 0UL); 230 eic_writel(eic, EDGE, 0UL);
@@ -232,7 +232,7 @@ static int __init eic_probe(struct platform_device *pdev)
232 232
233 eic->chip = &eic_chip; 233 eic->chip = &eic_chip;
234 234
235 for (i = 0; i < nr_irqs; i++) { 235 for (i = 0; i < nr_of_irqs; i++) {
236 set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, 236 set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
237 handle_level_irq); 237 handle_level_irq);
238 set_irq_chip_data(eic->first_irq + i, eic); 238 set_irq_chip_data(eic->first_irq + i, eic);
@@ -256,7 +256,7 @@ static int __init eic_probe(struct platform_device *pdev)
256 eic->regs, int_irq); 256 eic->regs, int_irq);
257 dev_info(&pdev->dev, 257 dev_info(&pdev->dev,
258 "Handling %u external IRQs, starting with IRQ %u\n", 258 "Handling %u external IRQs, starting with IRQ %u\n",
259 nr_irqs, eic->first_irq); 259 nr_of_irqs, eic->first_irq);
260 260
261 return 0; 261 return 0;
262 262