GPIO: gpio-pxa: simplify pxa_gpio_to_irq() and pxa_irq_to_chip()
authorDaniel Mack <zonque@gmail.com>
Sun, 22 Jul 2012 14:55:44 +0000 (16:55 +0200)
committerHaojian Zhuang <haojian.zhuang@gmail.com>
Thu, 16 Aug 2012 08:14:36 +0000 (16:14 +0800)
commit9450be76d0e3ebedf301aa09e4f98b4d3a175229
tree728c52b9fae8251ceeb9cde66b32e1200d0049e7
parent1e7ba630d4aeabef8e022a4099b20ab9f660d37d
GPIO: gpio-pxa: simplify pxa_gpio_to_irq() and pxa_irq_to_chip()

Simplify the code in gpio-pxa.c and make them based on irq_base.
When not probed from devicetree, initialize irq_base from
PXA_GPIO_TO_IRQ() or MMP_GPIO_TO_IRQ(), respectively, so the non-DT case
still works.

Only tested on PXA3xx.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
drivers/gpio/gpio-pxa.c