From: Linus Walleij Date: Mon, 7 Jan 2013 13:54:39 +0000 (+0100) Subject: pinctrl/nomadik: make independent of X-Git-Tag: v3.9-rc1~153^2~52 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=aa6e379aef84711f432ce754bda8e88b0270061c;p=linux-block.git pinctrl/nomadik: make independent of 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 Signed-off-by: Linus Walleij --- 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 @@ #include #include #include -#include #include "pinctrl-nomadik.h" #include "core.h" @@ -217,7 +216,7 @@ nmk_gpio_disable_lazy_irq(struct nmk_gpio_chip *nmk_chip, unsigned offset) u32 falling = nmk_chip->fimsc & BIT(offset); u32 rising = nmk_chip->rimsc & BIT(offset); int gpio = nmk_chip->chip.base + offset; - int irq = NOMADIK_GPIO_TO_IRQ(gpio); + int irq = irq_find_mapping(nmk_chip->domain, offset); struct irq_data *d = irq_get_irq_data(irq); if (!rising && !falling) @@ -1428,7 +1427,7 @@ static int nmk_gpio_probe(struct platform_device *dev) platform_set_drvdata(dev, nmk_chip); if (!np) - irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); + irq_start = pdata->first_irq; nmk_chip->domain = irq_domain_add_simple(np, NMK_GPIO_PER_CHIP, irq_start, &nmk_gpio_irq_simple_ops, nmk_chip);