aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-06-01 03:23:26 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-02 07:01:56 -0400
commitf5921697cf5cae68dcbfa881d9e08f3cebef47eb (patch)
treef62bed4b30a8c8258ec92dacc2da1c7f48007c22 /arch/powerpc/kernel/irq.c
parenta4c28ab7445f5ca60e56ffd90edb3e9fc1330b71 (diff)
[POWERPC] Compare irq numbers with NO_IRQ not IRQ_NONE
There is a thinko in the irq code, it uses IRQ_NONE to indicate no irq, whereas it should be using NO_IRQ. IRQ_NONE is returned from irq handlers to say "not handled". As it happens they currently have the same value (0), so this is just for future proof-ness. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 068377a2a8dc..42c8ed6ed528 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -489,7 +489,7 @@ struct irq_host *irq_alloc_host(unsigned int revmap_type,
489 case IRQ_HOST_MAP_LINEAR: 489 case IRQ_HOST_MAP_LINEAR:
490 rmap = (unsigned int *)(host + 1); 490 rmap = (unsigned int *)(host + 1);
491 for (i = 0; i < revmap_arg; i++) 491 for (i = 0; i < revmap_arg; i++)
492 rmap[i] = IRQ_NONE; 492 rmap[i] = NO_IRQ;
493 host->revmap_data.linear.size = revmap_arg; 493 host->revmap_data.linear.size = revmap_arg;
494 smp_wmb(); 494 smp_wmb();
495 host->revmap_data.linear.revmap = rmap; 495 host->revmap_data.linear.revmap = rmap;
@@ -614,7 +614,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
614 * host->ops->map() to update the flags 614 * host->ops->map() to update the flags
615 */ 615 */
616 virq = irq_find_mapping(host, hwirq); 616 virq = irq_find_mapping(host, hwirq);
617 if (virq != IRQ_NONE) { 617 if (virq != NO_IRQ) {
618 if (host->ops->remap) 618 if (host->ops->remap)
619 host->ops->remap(host, virq, hwirq); 619 host->ops->remap(host, virq, hwirq);
620 pr_debug("irq: -> existing mapping on virq %d\n", virq); 620 pr_debug("irq: -> existing mapping on virq %d\n", virq);
@@ -741,7 +741,7 @@ void irq_dispose_mapping(unsigned int virq)
741 switch(host->revmap_type) { 741 switch(host->revmap_type) {
742 case IRQ_HOST_MAP_LINEAR: 742 case IRQ_HOST_MAP_LINEAR:
743 if (hwirq < host->revmap_data.linear.size) 743 if (hwirq < host->revmap_data.linear.size)
744 host->revmap_data.linear.revmap[hwirq] = IRQ_NONE; 744 host->revmap_data.linear.revmap[hwirq] = NO_IRQ;
745 break; 745 break;
746 case IRQ_HOST_MAP_TREE: 746 case IRQ_HOST_MAP_TREE:
747 /* Check if radix tree allocated yet */ 747 /* Check if radix tree allocated yet */