summaryrefslogtreecommitdiff
path: root/drivers/sh/intc/dynamic.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-10-11 21:03:09 +0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-26 10:01:52 +0400
commitc4318baf00ed24b7fdcc255de33a18ab37ee8606 (patch)
tree2bf80722d2e7236de917e0e577fb14233e58e513 /drivers/sh/intc/dynamic.c
parent2f98492c5375e906e48c78d88351f45bb11b6a8a (diff)
downloadlinux-c4318baf00ed24b7fdcc255de33a18ab37ee8606.tar.xz
sh: Sanitize sparse irq
Switch over to the new allocator functions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh/intc/dynamic.c')
-rw-r--r--drivers/sh/intc/dynamic.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/sh/intc/dynamic.c b/drivers/sh/intc/dynamic.c
index 6caecdffe201..e994c7ed916e 100644
--- a/drivers/sh/intc/dynamic.c
+++ b/drivers/sh/intc/dynamic.c
@@ -37,7 +37,6 @@ unsigned int create_irq_nr(unsigned int irq_want, int node)
{
unsigned int irq = 0, new;
unsigned long flags;
- struct irq_desc *desc;
raw_spin_lock_irqsave(&vector_lock, flags);
@@ -55,24 +54,20 @@ unsigned int create_irq_nr(unsigned int irq_want, int node)
__set_bit(new, intc_irq_map);
}
- desc = irq_to_desc_alloc_node(new, node);
- if (unlikely(!desc)) {
+ raw_spin_unlock_irqrestore(&vector_lock, flags);
+
+ irq = irq_alloc_desc_at(new, node);
+ if (unlikely(irq != new)) {
pr_err("can't get irq_desc for %d\n", new);
- goto out_unlock;
+ return 0;
}
- desc = move_irq_desc(desc, node);
- irq = new;
+ activate_irq(irq);
+ return 0;
out_unlock:
raw_spin_unlock_irqrestore(&vector_lock, flags);
-
- if (irq > 0) {
- dynamic_irq_init(irq);
- activate_irq(irq);
- }
-
- return irq;
+ return 0;
}
int create_irq(void)
@@ -91,7 +86,7 @@ void destroy_irq(unsigned int irq)
{
unsigned long flags;
- dynamic_irq_cleanup(irq);
+ irq_free_desc(irq);
raw_spin_lock_irqsave(&vector_lock, flags);
__clear_bit(irq, intc_irq_map);