diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-10-11 11:34:16 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-16 16:13:43 -0400 |
commit | 203f0daafdf228a7e4e90a714a2a085884d91ea4 (patch) | |
tree | ae310bd9117993b495d0360a22c745fb150ced74 /drivers/gpio/gpio-moxart.c | |
parent | c771c2f484857f3b1fc81d180485e96b7cb67c17 (diff) |
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 @@ | |||
29 | #define GPIO_DATA_IN 0x04 | 29 | #define GPIO_DATA_IN 0x04 |
30 | #define GPIO_PIN_DIRECTION 0x08 | 30 | #define GPIO_PIN_DIRECTION 0x08 |
31 | 31 | ||
32 | static int moxart_gpio_request(struct gpio_chip *chip, unsigned offset) | ||
33 | { | ||
34 | return pinctrl_request_gpio(offset); | ||
35 | } | ||
36 | |||
37 | static void moxart_gpio_free(struct gpio_chip *chip, unsigned offset) | ||
38 | { | ||
39 | pinctrl_free_gpio(offset); | ||
40 | } | ||
41 | |||
42 | static int moxart_gpio_probe(struct platform_device *pdev) | 32 | static int moxart_gpio_probe(struct platform_device *pdev) |
43 | { | 33 | { |
44 | struct device *dev = &pdev->dev; | 34 | struct device *dev = &pdev->dev; |
@@ -66,8 +56,8 @@ static int moxart_gpio_probe(struct platform_device *pdev) | |||
66 | } | 56 | } |
67 | 57 | ||
68 | bgc->gc.label = "moxart-gpio"; | 58 | bgc->gc.label = "moxart-gpio"; |
69 | bgc->gc.request = moxart_gpio_request; | 59 | bgc->gc.request = gpiochip_generic_request; |
70 | bgc->gc.free = moxart_gpio_free; | 60 | bgc->gc.free = gpiochip_generic_free; |
71 | bgc->data = bgc->read_reg(bgc->reg_set); | 61 | bgc->data = bgc->read_reg(bgc->reg_set); |
72 | bgc->gc.base = 0; | 62 | bgc->gc.base = 0; |
73 | bgc->gc.ngpio = 32; | 63 | bgc->gc.ngpio = 32; |