Commit 3b1267b9 authored by Paul Mundt's avatar Paul Mundt

sh: dreamcast: 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 051f923d
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
* This file is part of the LinuxDC project (www.linuxdc.org) * This file is part of the LinuxDC project (www.linuxdc.org)
* Released under the terms of the GNU GPL v2.0 * Released under the terms of the GNU GPL v2.0
*/ */
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <linux/export.h>
#include <linux/err.h>
#include <mach/sysasic.h> #include <mach/sysasic.h>
/* /*
...@@ -141,26 +142,15 @@ int systemasic_irq_demux(int irq) ...@@ -141,26 +142,15 @@ int systemasic_irq_demux(int irq)
void systemasic_irq_init(void) void systemasic_irq_init(void)
{ {
int i, nid = cpu_to_node(boot_cpu_data); int irq_base, i;
/* Assign all virtual IRQs to the System ASIC int. handler */
for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) {
unsigned int irq;
irq = create_irq_nr(i, nid);
if (unlikely(irq == 0)) {
pr_err("%s: failed hooking irq %d for systemasic\n",
__func__, i);
return;
}
if (unlikely(irq != i)) { irq_base = irq_alloc_descs(HW_EVENT_IRQ_BASE, HW_EVENT_IRQ_BASE,
pr_err("%s: got irq %d but wanted %d, bailing.\n", HW_EVENT_IRQ_MAX - HW_EVENT_IRQ_BASE, -1);
__func__, irq, i); if (IS_ERR_VALUE(irq_base)) {
destroy_irq(irq); pr_err("%s: failed hooking irqs\n", __func__);
return; return;
} }
for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++)
irq_set_chip_and_handler(i, &systemasic_int, handle_level_irq); irq_set_chip_and_handler(i, &systemasic_int, handle_level_irq);
}
} }
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