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>
This commit is contained in:
parent
051f923d92
commit
3b1267b90f
1 changed files with 12 additions and 22 deletions
|
@ -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)
|
||||||
|
|
||||||
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 */
|
irq_base = irq_alloc_descs(HW_EVENT_IRQ_BASE, HW_EVENT_IRQ_BASE,
|
||||||
for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) {
|
HW_EVENT_IRQ_MAX - HW_EVENT_IRQ_BASE, -1);
|
||||||
unsigned int irq;
|
if (IS_ERR_VALUE(irq_base)) {
|
||||||
|
pr_err("%s: failed hooking irqs\n", __func__);
|
||||||
irq = create_irq_nr(i, nid);
|
return;
|
||||||
if (unlikely(irq == 0)) {
|
|
||||||
pr_err("%s: failed hooking irq %d for systemasic\n",
|
|
||||||
__func__, i);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unlikely(irq != i)) {
|
|
||||||
pr_err("%s: got irq %d but wanted %d, bailing.\n",
|
|
||||||
__func__, irq, i);
|
|
||||||
destroy_irq(irq);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
irq_set_chip_and_handler(i, &systemasic_int, handle_level_irq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++)
|
||||||
|
irq_set_chip_and_handler(i, &systemasic_int, handle_level_irq);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue