diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-10-11 18:34:16 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-16 23:13:43 +0300 |
commit | 203f0daafdf228a7e4e90a714a2a085884d91ea4 (patch) | |
tree | ae310bd9117993b495d0360a22c745fb150ced74 /drivers/gpio/gpio-moxart.c | |
parent | c771c2f484857f3b1fc81d180485e96b7cb67c17 (diff) | |
download | linux-203f0daafdf228a7e4e90a714a2a085884d91ea4.tar.xz |
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-moxart.c')
-rw-r--r-- | drivers/gpio/gpio-moxart.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-moxart.c b/drivers/gpio/gpio-moxart.c index abd8676ce2b6..d3355a6dc9b1 100644 --- a/drivers/gpio/gpio-moxart.c +++ b/drivers/gpio/gpio-moxart.c @@ -29,16 +29,6 @@ #define GPIO_DATA_IN 0x04 #define GPIO_PIN_DIRECTION 0x08 -static int moxart_gpio_request(struct gpio_chip *chip, unsigned offset) -{ - return pinctrl_request_gpio(offset); -} - -static void moxart_gpio_free(struct gpio_chip *chip, unsigned offset) -{ - pinctrl_free_gpio(offset); -} - static int moxart_gpio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -66,8 +56,8 @@ static int moxart_gpio_probe(struct platform_device *pdev) } bgc->gc.label = "moxart-gpio"; - bgc->gc.request = moxart_gpio_request; - bgc->gc.free = moxart_gpio_free; + bgc->gc.request = gpiochip_generic_request; + bgc->gc.free = gpiochip_generic_free; bgc->data = bgc->read_reg(bgc->reg_set); bgc->gc.base = 0; bgc->gc.ngpio = 32; |