@@ -472,15 +472,6 @@ static int omap_gpio_is_input(struct gpio_bank *bank, unsigned offset)
return readl_relaxed(reg) & BIT(offset);
}
-static void omap_gpio_init_irq(struct gpio_bank *bank, unsigned offset)
-{
- if (!LINE_USED(bank->mod_usage, offset)) {
- omap_enable_gpio_module(bank, offset);
- omap_set_gpio_direction(bank, offset, 1);
- }
- bank->irq_usage |= BIT(offset);
-}
-
static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
{
struct gpio_bank *bank = omap_irq_data_get_bank(d);
@@ -502,12 +493,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
retval = omap_set_gpio_triggering(bank, offset, type);
if (retval)
goto error;
- omap_gpio_init_irq(bank, offset);
- if (!omap_gpio_is_input(bank, offset)) {
- spin_unlock_irqrestore(&bank->lock, flags);
- retval = -EINVAL;
- goto error;
- }
spin_unlock_irqrestore(&bank->lock, flags);
if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
The omap_gpio_irq_type() can do only configuration of GPIO IRQ triggering type, because now OMAP GPIO driver has implemented .irq_startup()/.irq_shutdown() which are responsible for GPIO bank enabling and pin direction configuration. Hence, remove redundant code and omap_gpio_init_irq() which is not used any more. Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org> --- drivers/gpio/gpio-omap.c | 15 --------------- 1 file changed, 15 deletions(-)