Commit 051f923d authored by Paul Mundt's avatar Paul Mundt

sh: hd64461: Migrate off of deprecated dynamic IRQ API.

Switches from create_irq_nr() to irq_alloc_descs().
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent d0e05bb3
...@@ -73,10 +73,7 @@ static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc) ...@@ -73,10 +73,7 @@ static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc)
int __init setup_hd64461(void) int __init setup_hd64461(void)
{ {
int i, nid = cpu_to_node(boot_cpu_data); int irq_base, i;
if (!MACH_HD64461)
return 0;
printk(KERN_INFO printk(KERN_INFO
"HD64461 configured at 0x%x on irq %d(mapped into %d to %d)\n", "HD64461 configured at 0x%x on irq %d(mapped into %d to %d)\n",
...@@ -89,27 +86,15 @@ int __init setup_hd64461(void) ...@@ -89,27 +86,15 @@ int __init setup_hd64461(void)
#endif #endif
__raw_writew(0xffff, HD64461_NIMR); __raw_writew(0xffff, HD64461_NIMR);
/* IRQ 80 -> 95 belongs to HD64461 */ irq_base = irq_alloc_descs(HD64461_IRQBASE, HD64461_IRQBASE, 16, -1);
for (i = HD64461_IRQBASE; i < HD64461_IRQBASE + 16; i++) { if (IS_ERR_VALUE(irq_base)) {
unsigned int irq; pr_err("%s: failed hooking irqs for HD64461\n", __func__);
return irq_base;
irq = create_irq_nr(i, nid);
if (unlikely(irq == 0)) {
pr_err("%s: failed hooking irq %d for HD64461\n",
__func__, i);
return -EBUSY;
} }
if (unlikely(irq != i)) { for (i = 0; i < 16; i++)
pr_err("%s: got irq %d but wanted %d, bailing.\n", irq_set_chip_and_handler(irq_base + i, &hd64461_irq_chip,
__func__, irq, i);
destroy_irq(irq);
return -EINVAL;
}
irq_set_chip_and_handler(i, &hd64461_irq_chip,
handle_level_irq); handle_level_irq);
}
irq_set_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux); irq_set_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux);
irq_set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW); irq_set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment