diff --git a/drivers/gpio/gpio-dln2.c b/drivers/gpio/gpio-dln2.c index 1dada68b9a27..c4e7953c093e 100644 --- a/drivers/gpio/gpio-dln2.c +++ b/drivers/gpio/gpio-dln2.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -204,9 +203,9 @@ static int dln2_gpio_get_direction(struct gpio_chip *chip, unsigned offset) struct dln2_gpio *dln2 = gpiochip_get_data(chip); if (test_bit(offset, dln2->output_enabled)) - return GPIOF_DIR_OUT; + return 0; - return GPIOF_DIR_IN; + return 1; } static int dln2_gpio_get(struct gpio_chip *chip, unsigned int offset) @@ -218,7 +217,7 @@ static int dln2_gpio_get(struct gpio_chip *chip, unsigned int offset) if (dir < 0) return dir; - if (dir == GPIOF_DIR_IN) + if (dir == 1) return dln2_gpio_pin_get_in_val(dln2, offset); return dln2_gpio_pin_get_out_val(dln2, offset);