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>
This commit is contained in:
Yinghai Lu
2008-08-19 20:50:05 -07:00
committed by Ingo Molnar
parent bfea1238be
commit 08678b0841
28 changed files with 405 additions and 188 deletions

View File

@@ -346,10 +346,10 @@ static int __init eisa_probe(struct parisc_device *dev)
}
/* Reserve IRQ2 */
irq_desc[2].action = &irq2_action;
irq_to_desc(2)->action = &irq2_action;
for (i = 0; i < 16; i++) {
irq_desc[i].chip = &eisa_interrupt_type;
irq_to_desc(i)->chip = &eisa_interrupt_type;
}
EISA_bus = 1;