diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-05-18 23:36:44 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-05-18 23:36:44 +0900 |
commit | 3b1267b90f6b7c080024101696c0454f455761f4 (patch) | |
tree | ce51797c476b8320b1b49f1710e0a6c6c1fba032 /arch/sh/boards | |
parent | 051f923d922d105f4d32e64cba1ed6f5a749d530 (diff) | |
download | linux-3b1267b90f6b7c080024101696c0454f455761f4.tar.gz linux-3b1267b90f6b7c080024101696c0454f455761f4.tar.bz2 linux-3b1267b90f6b7c080024101696c0454f455761f4.zip |
sh: dreamcast: Migrate off of deprecated dynamic IRQ API.
Switches from create_irq_nr() to irq_alloc_descs().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-dreamcast/irq.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c index f63d323f411f..2789647abebe 100644 --- a/arch/sh/boards/mach-dreamcast/irq.c +++ b/arch/sh/boards/mach-dreamcast/irq.c @@ -8,10 +8,11 @@ * This file is part of the LinuxDC project (www.linuxdc.org) * Released under the terms of the GNU GPL v2.0 */ - #include <linux/irq.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> /* @@ -141,26 +142,15 @@ int systemasic_irq_demux(int irq) void systemasic_irq_init(void) { - int i, nid = cpu_to_node(boot_cpu_data); - - /* 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; - } + int irq_base, i; - if (unlikely(irq != i)) { - pr_err("%s: got irq %d but wanted %d, bailing.\n", - __func__, irq, i); - destroy_irq(irq); - return; - } + irq_base = irq_alloc_descs(HW_EVENT_IRQ_BASE, HW_EVENT_IRQ_BASE, + HW_EVENT_IRQ_MAX - HW_EVENT_IRQ_BASE, -1); + if (IS_ERR_VALUE(irq_base)) { + pr_err("%s: failed hooking irqs\n", __func__); + return; + } + for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) irq_set_chip_and_handler(i, &systemasic_int, handle_level_irq); - } } |