提交 17d33a45 编写于 作者: G Grygorii Strashko 提交者: Linus Walleij

gpio: omap: get rid of GPIO_INDEX() macro

Now OMAP GPIO driver prepared for GPIO_INDEX() macro removing.
Do It ;)
Tested-by: NTony Lindgren <tony@atomide.com>
Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: NSantosh Shilimkar <ssantosh@kernel.org>
Acked-by: NJavier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: NGrygorii Strashko <grygorii.strashko@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 ea5fbe8d
...@@ -81,7 +81,6 @@ struct gpio_bank { ...@@ -81,7 +81,6 @@ struct gpio_bank {
struct omap_gpio_reg_offs *regs; struct omap_gpio_reg_offs *regs;
}; };
#define GPIO_INDEX(bank, gpio) (gpio % bank->width)
#define GPIO_MOD_CTRL_BIT BIT(0) #define GPIO_MOD_CTRL_BIT BIT(0)
#define BANK_USED(bank) (bank->mod_usage || bank->irq_usage) #define BANK_USED(bank) (bank->mod_usage || bank->irq_usage)
...@@ -492,14 +491,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type) ...@@ -492,14 +491,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
if (!BANK_USED(bank)) if (!BANK_USED(bank))
pm_runtime_get_sync(bank->dev); pm_runtime_get_sync(bank->dev);
#ifdef CONFIG_ARCH_OMAP1
if (d->irq > IH_MPUIO_BASE) {
unsigned gpio = 0;
gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE);
offset = GPIO_INDEX(bank, gpio);
}
#endif
if (type & ~IRQ_TYPE_SENSE_MASK) if (type & ~IRQ_TYPE_SENSE_MASK)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册