Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276450
b: refs/heads/master
c: 77a7300
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Linus Torvalds committed Dec 7, 2011
1 parent c80ce18 commit de746c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10ec5e6c0cfcc4289c0cb056cd330ad70ea39b7f
refs/heads/master: 77a7300abad7fe01891b400e88d746f97307ee5a
13 changes: 4 additions & 9 deletions trunk/drivers/of/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
#include <linux/string.h>
#include <linux/slab.h>

/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */
#ifndef NO_IRQ
#define NO_IRQ 0
#endif

/**
* irq_of_parse_and_map - Parse and map an interrupt into linux virq space
* @device: Device node of the device whose interrupt is to be mapped
Expand All @@ -44,7 +39,7 @@ unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
struct of_irq oirq;

if (of_irq_map_one(dev, index, &oirq))
return NO_IRQ;
return 0;

return irq_create_of_mapping(oirq.controller, oirq.specifier,
oirq.size);
Expand Down Expand Up @@ -345,7 +340,7 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)

/* Only dereference the resource if both the
* resource and the irq are valid. */
if (r && irq != NO_IRQ) {
if (r && irq) {
r->start = r->end = irq;
r->flags = IORESOURCE_IRQ;
r->name = dev->full_name;
Expand All @@ -363,7 +358,7 @@ int of_irq_count(struct device_node *dev)
{
int nr = 0;

while (of_irq_to_resource(dev, nr, NULL) != NO_IRQ)
while (of_irq_to_resource(dev, nr, NULL))
nr++;

return nr;
Expand All @@ -383,7 +378,7 @@ int of_irq_to_resource_table(struct device_node *dev, struct resource *res,
int i;

for (i = 0; i < nr_irqs; i++, res++)
if (of_irq_to_resource(dev, i, res) == NO_IRQ)
if (!of_irq_to_resource(dev, i, res))
break;

return i;
Expand Down

0 comments on commit de746c3

Please sign in to comment.