Skip to content

Commit

Permalink
gpio: tegra: Include the right header
Browse files Browse the repository at this point in the history
This is a GPIO driver so include only <linux/gpio/driver.h>.
Drop the use of GPIOF_* flags: these are for consumers, not
drivers. Just return 0/1.

Cc: Stefan Agner <stefan@agner.ch>
Cc: Thierry Reding <treding@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
linusw committed Aug 10, 2018
1 parent d799a4d commit 21041da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/gpio-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/gpio/driver.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/module.h>
Expand Down Expand Up @@ -207,7 +207,7 @@ static int tegra_gpio_get_direction(struct gpio_chip *chip,

oe = tegra_gpio_readl(tgi, GPIO_OE(tgi, offset));

return (oe & pin_mask) ? GPIOF_DIR_OUT : GPIOF_DIR_IN;
return !(oe & pin_mask);
}

static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
Expand Down

0 comments on commit 21041da

Please sign in to comment.