aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-01-07 08:54:39 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-01-11 15:49:20 -0500
commitaa6e379aef84711f432ce754bda8e88b0270061c (patch)
treedc0002c57c26e4602a6239a973a0438ada8df159 /drivers/pinctrl
parent483f33f63c1cb3c6becb465bac7b75d7ff5e3b8f (diff)
pinctrl/nomadik: make independent of <mach/irqs.h>
Some leftovers in the driver were using NOMADIK_* macros to translate the irq numbers to offsets, while the first base IRQ was already being passed from platform data, and the function setting the disable mask could just as well use the irqdomain. Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 5d8a0066ab60..4814d5403733 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -32,7 +32,6 @@
32#include <linux/pinctrl/consumer.h> 32#include <linux/pinctrl/consumer.h>
33#include <linux/platform_data/pinctrl-nomadik.h> 33#include <linux/platform_data/pinctrl-nomadik.h>
34#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35#include <mach/irqs.h>
36#include "pinctrl-nomadik.h" 35#include "pinctrl-nomadik.h"
37#include "core.h" 36#include "core.h"
38 37
@@ -217,7 +216,7 @@ nmk_gpio_disable_lazy_irq(struct nmk_gpio_chip *nmk_chip, unsigned offset)
217 u32 falling = nmk_chip->fimsc & BIT(offset); 216 u32 falling = nmk_chip->fimsc & BIT(offset);
218 u32 rising = nmk_chip->rimsc & BIT(offset); 217 u32 rising = nmk_chip->rimsc & BIT(offset);
219 int gpio = nmk_chip->chip.base + offset; 218 int gpio = nmk_chip->chip.base + offset;
220 int irq = NOMADIK_GPIO_TO_IRQ(gpio); 219 int irq = irq_find_mapping(nmk_chip->domain, offset);
221 struct irq_data *d = irq_get_irq_data(irq); 220 struct irq_data *d = irq_get_irq_data(irq);
222 221
223 if (!rising && !falling) 222 if (!rising && !falling)
@@ -1428,7 +1427,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
1428 platform_set_drvdata(dev, nmk_chip); 1427 platform_set_drvdata(dev, nmk_chip);
1429 1428
1430 if (!np) 1429 if (!np)
1431 irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); 1430 irq_start = pdata->first_irq;
1432 nmk_chip->domain = irq_domain_add_simple(np, 1431 nmk_chip->domain = irq_domain_add_simple(np,
1433 NMK_GPIO_PER_CHIP, irq_start, 1432 NMK_GPIO_PER_CHIP, irq_start,
1434 &nmk_gpio_irq_simple_ops, nmk_chip); 1433 &nmk_gpio_irq_simple_ops, nmk_chip);