aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mvebu.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-10-11 11:34:16 -0400
committerLinus Walleij <linus.walleij@linaro.org>2015-10-16 16:13:43 -0400
commit203f0daafdf228a7e4e90a714a2a085884d91ea4 (patch)
treeae310bd9117993b495d0360a22c745fb150ced74 /drivers/gpio/gpio-mvebu.c
parentc771c2f484857f3b1fc81d180485e96b7cb67c17 (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-mvebu.c')
-rw-r--r--drivers/gpio/gpio-mvebu.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index df418b81456d..d428b97876c5 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -185,16 +185,6 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
185 * Functions implementing the gpio_chip methods 185 * Functions implementing the gpio_chip methods
186 */ 186 */
187 187
188static int mvebu_gpio_request(struct gpio_chip *chip, unsigned pin)
189{
190 return pinctrl_request_gpio(chip->base + pin);
191}
192
193static void mvebu_gpio_free(struct gpio_chip *chip, unsigned pin)
194{
195 pinctrl_free_gpio(chip->base + pin);
196}
197
198static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value) 188static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
199{ 189{
200 struct mvebu_gpio_chip *mvchip = 190 struct mvebu_gpio_chip *mvchip =
@@ -709,8 +699,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
709 mvchip->soc_variant = soc_variant; 699 mvchip->soc_variant = soc_variant;
710 mvchip->chip.label = dev_name(&pdev->dev); 700 mvchip->chip.label = dev_name(&pdev->dev);
711 mvchip->chip.dev = &pdev->dev; 701 mvchip->chip.dev = &pdev->dev;
712 mvchip->chip.request = mvebu_gpio_request; 702 mvchip->chip.request = gpiochip_generic_request;
713 mvchip->chip.free = mvebu_gpio_free; 703 mvchip->chip.free = gpiochip_generic_free;
714 mvchip->chip.direction_input = mvebu_gpio_direction_input; 704 mvchip->chip.direction_input = mvebu_gpio_direction_input;
715 mvchip->chip.get = mvebu_gpio_get; 705 mvchip->chip.get = mvebu_gpio_get;
716 mvchip->chip.direction_output = mvebu_gpio_direction_output; 706 mvchip->chip.direction_output = mvebu_gpio_direction_output;