[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>
This commit is contained in:
committed by
Paul Mackerras
parent
a4c28ab744
commit
f5921697cf
@@ -489,7 +489,7 @@ struct irq_host *irq_alloc_host(unsigned int revmap_type,
|
|||||||
case IRQ_HOST_MAP_LINEAR:
|
case IRQ_HOST_MAP_LINEAR:
|
||||||
rmap = (unsigned int *)(host + 1);
|
rmap = (unsigned int *)(host + 1);
|
||||||
for (i = 0; i < revmap_arg; i++)
|
for (i = 0; i < revmap_arg; i++)
|
||||||
rmap[i] = IRQ_NONE;
|
rmap[i] = NO_IRQ;
|
||||||
host->revmap_data.linear.size = revmap_arg;
|
host->revmap_data.linear.size = revmap_arg;
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
host->revmap_data.linear.revmap = rmap;
|
host->revmap_data.linear.revmap = rmap;
|
||||||
@@ -614,7 +614,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
|
|||||||
* host->ops->map() to update the flags
|
* host->ops->map() to update the flags
|
||||||
*/
|
*/
|
||||||
virq = irq_find_mapping(host, hwirq);
|
virq = irq_find_mapping(host, hwirq);
|
||||||
if (virq != IRQ_NONE) {
|
if (virq != NO_IRQ) {
|
||||||
if (host->ops->remap)
|
if (host->ops->remap)
|
||||||
host->ops->remap(host, virq, hwirq);
|
host->ops->remap(host, virq, hwirq);
|
||||||
pr_debug("irq: -> existing mapping on virq %d\n", virq);
|
pr_debug("irq: -> existing mapping on virq %d\n", virq);
|
||||||
@@ -741,7 +741,7 @@ void irq_dispose_mapping(unsigned int virq)
|
|||||||
switch(host->revmap_type) {
|
switch(host->revmap_type) {
|
||||||
case IRQ_HOST_MAP_LINEAR:
|
case IRQ_HOST_MAP_LINEAR:
|
||||||
if (hwirq < host->revmap_data.linear.size)
|
if (hwirq < host->revmap_data.linear.size)
|
||||||
host->revmap_data.linear.revmap[hwirq] = IRQ_NONE;
|
host->revmap_data.linear.revmap[hwirq] = NO_IRQ;
|
||||||
break;
|
break;
|
||||||
case IRQ_HOST_MAP_TREE:
|
case IRQ_HOST_MAP_TREE:
|
||||||
/* Check if radix tree allocated yet */
|
/* Check if radix tree allocated yet */
|
||||||
|
Reference in New Issue
Block a user