aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/spurious.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:29 -0400
commit08678b0841267c1d00d771fe01548d86043d065e (patch)
tree7debb21f9e9a768ced43077f7376797a0c46f8c0 /kernel/irq/spurious.c
parentbfea1238beac9d306eeac081c67de5ca6aec4c7a (diff)
generic: sparse irqs: use irq_desc() together with dyn_array, instead of irq_desc[]
add CONFIG_HAVE_SPARSE_IRQ to for use condensed array. Get rid of irq_desc[] array assumptions. Preallocate 32 irq_desc, and irq_desc() will try to get more. ( No change in functionality is expected anywhere, except the odd build failure where we missed a code site or where a crossing commit itroduces new irq_desc[] usage. ) v2: according to Eric, change get_irq_desc() to irq_desc() Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/spurious.c')
-rw-r--r--kernel/irq/spurious.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index e26ca1e90c08..b5d906002e1d 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -92,11 +92,12 @@ static int misrouted_irq(int irq)
92 int ok = 0; 92 int ok = 0;
93 93
94 for (i = 1; i < nr_irqs; i++) { 94 for (i = 1; i < nr_irqs; i++) {
95 struct irq_desc *desc = irq_desc + i; 95 struct irq_desc *desc;
96 96
97 if (i == irq) /* Already tried */ 97 if (i == irq) /* Already tried */
98 continue; 98 continue;
99 99
100 desc = irq_to_desc(i);
100 if (try_one_irq(i, desc)) 101 if (try_one_irq(i, desc))
101 ok = 1; 102 ok = 1;
102 } 103 }
@@ -108,7 +109,7 @@ static void poll_spurious_irqs(unsigned long dummy)
108{ 109{
109 int i; 110 int i;
110 for (i = 1; i < nr_irqs; i++) { 111 for (i = 1; i < nr_irqs; i++) {
111 struct irq_desc *desc = irq_desc + i; 112 struct irq_desc *desc = irq_to_desc(i);
112 unsigned int status; 113 unsigned int status;
113 114
114 /* Racy but it doesn't matter */ 115 /* Racy but it doesn't matter */