summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-tz1090-pdc.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-10-11 17:34:16 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-10-16 22:13:43 +0200
commit203f0daafdf228a7e4e90a714a2a085884d91ea4 (patch)
treeae310bd9117993b495d0360a22c745fb150ced74 /drivers/gpio/gpio-tz1090-pdc.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-tz1090-pdc.c')
-rw-r--r--drivers/gpio/gpio-tz1090-pdc.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-tz1090-pdc.c b/drivers/gpio/gpio-tz1090-pdc.c
index ede7e403ffde..3623d009d808 100644
--- a/drivers/gpio/gpio-tz1090-pdc.c
+++ b/drivers/gpio/gpio-tz1090-pdc.c
@@ -137,16 +137,6 @@ static void tz1090_pdc_gpio_set(struct gpio_chip *chip, unsigned int offset,
__global_unlock2(lstat);
}
-static int tz1090_pdc_gpio_request(struct gpio_chip *chip, unsigned int offset)
-{
- return pinctrl_request_gpio(chip->base + offset);
-}
-
-static void tz1090_pdc_gpio_free(struct gpio_chip *chip, unsigned int offset)
-{
- pinctrl_free_gpio(chip->base + offset);
-}
-
static int tz1090_pdc_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
{
struct tz1090_pdc_gpio *priv = to_pdc(chip);
@@ -203,8 +193,8 @@ static int tz1090_pdc_gpio_probe(struct platform_device *pdev)
priv->chip.direction_output = tz1090_pdc_gpio_direction_output;
priv->chip.get = tz1090_pdc_gpio_get;
priv->chip.set = tz1090_pdc_gpio_set;
- priv->chip.free = tz1090_pdc_gpio_free;
- priv->chip.request = tz1090_pdc_gpio_request;
+ priv->chip.free = gpiochip_generic_free;
+ priv->chip.request = gpiochip_generic_request;
priv->chip.to_irq = tz1090_pdc_gpio_to_irq;
priv->chip.of_node = np;