aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2011-12-09 15:11:41 -0500
committerRob Herring <rob.herring@calxeda.com>2012-01-04 11:10:19 -0500
commitf2ab2ba09e081fbce068c0adc205ad3f25a3b626 (patch)
treea4979bbc2bd70534cc24b15a17e897fa36ad462e /drivers/gpio
parentdece904d74800d109f1bb06b55758169b1bcc140 (diff)
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: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.ml.walleij@gmail.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-pl061.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 0f718f9bbd8c..fe19dec4b117 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -53,7 +53,7 @@ struct pl061_gpio {
53 spinlock_t irq_lock; /* IRQ registers */ 53 spinlock_t irq_lock; /* IRQ registers */
54 54
55 void __iomem *base; 55 void __iomem *base;
56 unsigned irq_base; 56 int irq_base;
57 struct gpio_chip gc; 57 struct gpio_chip gc;
58}; 58};
59 59
@@ -119,7 +119,7 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset)
119{ 119{
120 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); 120 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
121 121
122 if (chip->irq_base == NO_IRQ) 122 if (chip->irq_base <= 0)
123 return -EINVAL; 123 return -EINVAL;
124 124
125 return chip->irq_base + offset; 125 return chip->irq_base + offset;
@@ -250,7 +250,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
250 chip->irq_base = pdata->irq_base; 250 chip->irq_base = pdata->irq_base;
251 } else if (dev->dev.of_node) { 251 } else if (dev->dev.of_node) {
252 chip->gc.base = -1; 252 chip->gc.base = -1;
253 chip->irq_base = NO_IRQ; 253 chip->irq_base = 0;
254 } else { 254 } else {
255 ret = -ENODEV; 255 ret = -ENODEV;
256 goto free_mem; 256 goto free_mem;
@@ -290,7 +290,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
290 * irq_chip support 290 * irq_chip support
291 */ 291 */
292 292
293 if (chip->irq_base == NO_IRQ) 293 if (chip->irq_base <= 0)
294 return 0; 294 return 0;
295 295
296 writeb(0, chip->base + GPIOIE); /* disable irqs */ 296 writeb(0, chip->base + GPIOIE); /* disable irqs */