summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-10-11 16:33:44 +0200
committerLinus Walleij <linus.walleij@linaro.org>2012-10-15 09:09:27 +0200
commit51f58c68a364363b29c07668c90af19c9b8a8c85 (patch)
tree8a302bfe4687cbc2f0e7d4177874e5d8db5dd86c /drivers/pinctrl
parentb7213702662e2139be92c4a3efe6682529f7a729 (diff)
downloadblackbird-op-linux-51f58c68a364363b29c07668c90af19c9b8a8c85.tar.gz
blackbird-op-linux-51f58c68a364363b29c07668c90af19c9b8a8c85.zip
pinctrl/nomadik: always use the simple irqdomain
Since the simple irqdomain will fall back to a linear domain if the first_irq provided is <= 0, just use this, just make sure the first_irq is negative in the device tree case. Cc: Rob Herring <rob.herring@calxeda.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index f640f13f73ca..01aea1c3b5fa 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -1281,6 +1281,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
struct clk *clk;
int secondary_irq;
void __iomem *base;
+ int irq_start = -1;
int irq;
int ret;
@@ -1384,19 +1385,11 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
platform_set_drvdata(dev, nmk_chip);
- if (np) {
- /* The DT case will just grab a set of IRQ numbers */
- nmk_chip->domain = irq_domain_add_linear(np, NMK_GPIO_PER_CHIP,
- &nmk_gpio_irq_simple_ops, nmk_chip);
- } else {
- /* Non-DT legacy mode, use hardwired IRQ numbers */
- int irq_start;
-
+ if (!np)
irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio);
- nmk_chip->domain = irq_domain_add_simple(NULL,
+ nmk_chip->domain = irq_domain_add_simple(NULL,
NMK_GPIO_PER_CHIP, irq_start,
&nmk_gpio_irq_simple_ops, nmk_chip);
- }
if (!nmk_chip->domain) {
dev_err(&dev->dev, "failed to create irqdomain\n");
ret = -ENOSYS;
OpenPOWER on IntegriCloud