Commit 1cb6610a authored by Linus Walleij's avatar Linus Walleij

gpio: dln2: Include proper header

This driver has no business including <linux/gpio.h>, it is a
driver so include <linux/gpio/driver.h>.

GPIOF_DIR_IN/GPIOF_DIR_OUT are for consumers and should not be
used in drivers to use just 1/0 instead.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 95260c17
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
#include <linux/gpio.h>
#include <linux/gpio/driver.h> #include <linux/gpio/driver.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mfd/dln2.h> #include <linux/mfd/dln2.h>
...@@ -204,9 +203,9 @@ static int dln2_gpio_get_direction(struct gpio_chip *chip, unsigned offset) ...@@ -204,9 +203,9 @@ static int dln2_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
struct dln2_gpio *dln2 = gpiochip_get_data(chip); struct dln2_gpio *dln2 = gpiochip_get_data(chip);
if (test_bit(offset, dln2->output_enabled)) 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) 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) ...@@ -218,7 +217,7 @@ static int dln2_gpio_get(struct gpio_chip *chip, unsigned int offset)
if (dir < 0) if (dir < 0)
return dir; return dir;
if (dir == GPIOF_DIR_IN) if (dir == 1)
return dln2_gpio_pin_get_in_val(dln2, offset); return dln2_gpio_pin_get_in_val(dln2, offset);
return dln2_gpio_pin_get_out_val(dln2, offset); return dln2_gpio_pin_get_out_val(dln2, offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment