diff options
-rw-r--r-- | drivers/gpio/gpio-pl061.c | 8 | ||||
-rw-r--r-- | include/linux/amba/pl061.h | 2 |
2 files changed, 5 insertions, 5 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 */ |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index 2412af944f1f..fb83c0453489 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
@@ -7,7 +7,7 @@ struct pl061_platform_data { | |||
7 | unsigned gpio_base; | 7 | unsigned gpio_base; |
8 | 8 | ||
9 | /* number of the first IRQ. | 9 | /* number of the first IRQ. |
10 | * If the IRQ functionality in not desired this must be set to NO_IRQ. | 10 | * If the IRQ functionality in not desired this must be set to 0. |
11 | */ | 11 | */ |
12 | unsigned irq_base; | 12 | unsigned irq_base; |
13 | 13 | ||