diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-10-11 17:34:16 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-16 22:13:43 +0200 |
commit | 203f0daafdf228a7e4e90a714a2a085884d91ea4 (patch) | |
tree | ae310bd9117993b495d0360a22c745fb150ced74 /drivers/gpio/gpio-lpc18xx.c | |
parent | c771c2f484857f3b1fc81d180485e96b7cb67c17 (diff) | |
download | linux-203f0daafdf228a7e4e90a714a2a085884d91ea4.tar.gz linux-203f0daafdf228a7e4e90a714a2a085884d91ea4.tar.bz2 linux-203f0daafdf228a7e4e90a714a2a085884d91ea4.zip |
gpio: replace trivial implementations of request/free with generic one
Replace all trivial request/free callbacks that do nothing but call into
pinctrl code with the generic versions.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-lpc18xx.c')
-rw-r--r-- | drivers/gpio/gpio-lpc18xx.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c index eb68603136b0..e39dcb0af8ae 100644 --- a/drivers/gpio/gpio-lpc18xx.c +++ b/drivers/gpio/gpio-lpc18xx.c @@ -36,16 +36,6 @@ static inline struct lpc18xx_gpio_chip *to_lpc18xx_gpio(struct gpio_chip *chip) return container_of(chip, struct lpc18xx_gpio_chip, gpio); } -static int lpc18xx_gpio_request(struct gpio_chip *chip, unsigned offset) -{ - return pinctrl_request_gpio(offset); -} - -static void lpc18xx_gpio_free(struct gpio_chip *chip, unsigned offset) -{ - pinctrl_free_gpio(offset); -} - static void lpc18xx_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { struct lpc18xx_gpio_chip *gc = to_lpc18xx_gpio(chip); @@ -95,8 +85,8 @@ static int lpc18xx_gpio_direction_output(struct gpio_chip *chip, static struct gpio_chip lpc18xx_chip = { .label = "lpc18xx/43xx-gpio", - .request = lpc18xx_gpio_request, - .free = lpc18xx_gpio_free, + .request = gpiochip_generic_request, + .free = gpiochip_generic_free, .direction_input = lpc18xx_gpio_direction_input, .direction_output = lpc18xx_gpio_direction_output, .set = lpc18xx_gpio_set, |