Commit f2ab2ba0 authored by Rob Herring's avatar Rob Herring

gpio: pl061: convert to use 0 for no irq

We don't want drivers using NO_IRQ, so remove its use. For now, 0 or
-1 means no irq until platforms are converted to use 0.
Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Cc: Linus Walleij <linus.ml.walleij@gmail.com>
parent dece904d
...@@ -53,7 +53,7 @@ struct pl061_gpio { ...@@ -53,7 +53,7 @@ struct pl061_gpio {
spinlock_t irq_lock; /* IRQ registers */ spinlock_t irq_lock; /* IRQ registers */
void __iomem *base; void __iomem *base;
unsigned irq_base; int irq_base;
struct gpio_chip gc; struct gpio_chip gc;
}; };
...@@ -119,7 +119,7 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset) ...@@ -119,7 +119,7 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset)
{ {
struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
if (chip->irq_base == NO_IRQ) if (chip->irq_base <= 0)
return -EINVAL; return -EINVAL;
return chip->irq_base + offset; return chip->irq_base + offset;
...@@ -250,7 +250,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) ...@@ -250,7 +250,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
chip->irq_base = pdata->irq_base; chip->irq_base = pdata->irq_base;
} else if (dev->dev.of_node) { } else if (dev->dev.of_node) {
chip->gc.base = -1; chip->gc.base = -1;
chip->irq_base = NO_IRQ; chip->irq_base = 0;
} else { } else {
ret = -ENODEV; ret = -ENODEV;
goto free_mem; goto free_mem;
...@@ -290,7 +290,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) ...@@ -290,7 +290,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
* irq_chip support * irq_chip support
*/ */
if (chip->irq_base == NO_IRQ) if (chip->irq_base <= 0)
return 0; return 0;
writeb(0, chip->base + GPIOIE); /* disable irqs */ writeb(0, chip->base + GPIOIE); /* disable irqs */
......
...@@ -7,7 +7,7 @@ struct pl061_platform_data { ...@@ -7,7 +7,7 @@ struct pl061_platform_data {
unsigned gpio_base; unsigned gpio_base;
/* number of the first IRQ. /* number of the first IRQ.
* If the IRQ functionality in not desired this must be set to NO_IRQ. * If the IRQ functionality in not desired this must be set to 0.
*/ */
unsigned irq_base; unsigned irq_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment