From 78456d6ff815894e593675fc524cade9844501d5 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 6 Jul 2016 14:40:08 +0200 Subject: Revert "gpio: convince line to become input in irq helper" This reverts commit 7e7c059cb50c7c72d5a393b2c34fc57de1b01b55. I was wrong about trying to do this, as it breaks the orthogonality between gpiochips and irqchips. Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5b0f4545f61b..2dff16915c11 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1510,25 +1510,6 @@ static int gpiochip_irq_reqres(struct irq_data *d) if (!try_module_get(chip->gpiodev->owner)) return -ENODEV; - /* - * If it is possible to switch this GPIO to an input - * this is a good time to do it. - */ - if (chip->direction_input) { - struct gpio_desc *desc; - int ret; - - desc = gpiochip_get_desc(chip, d->hwirq); - if (IS_ERR(desc)) - return PTR_ERR(desc); - - ret = chip->direction_input(chip, d->hwirq); - if (ret) - return ret; - - clear_bit(FLAG_IS_OUT, &desc->flags); - } - if (gpiochip_lock_as_irq(chip, d->hwirq)) { chip_err(chip, "unable to lock HW IRQ %lu for IRQ\n", -- cgit v1.2.3