diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-11-29 21:00:32 +0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-15 16:33:37 +0400 |
commit | 24d6b36e91b0503cd1c88b34fa793c0c65fa767d (patch) | |
tree | e7855b99d82ddf0da8d9a5b0ca8e809476a583b0 /drivers/pinctrl | |
parent | 2119f7c9afaf4c5fe88e9ffec1f34c5bc6b02f78 (diff) | |
download | linux-24d6b36e91b0503cd1c88b34fa793c0c65fa767d.tar.xz |
sh-pfc: Don't needlessly check GPIO type in sh_gpio_free()
The GPIO type is always PINMUX_TYPE_FUNCTION when freeing a function
GPIO. Hardcode the type value.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 80a50d8a50e7..8f01113d0ecb 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c @@ -71,16 +71,13 @@ static void sh_gpio_free(struct gpio_chip *gc, unsigned offset) { struct sh_pfc *pfc = gpio_to_pfc(gc); unsigned long flags; - int pinmux_type; if (offset < pfc->info->nr_pins) return pinctrl_free_gpio(offset); spin_lock_irqsave(&pfc->lock, flags); - pinmux_type = pfc->info->gpios[offset].flags & PINMUX_FLAG_TYPE; - - sh_pfc_config_gpio(pfc, offset, pinmux_type, GPIO_CFG_FREE); + sh_pfc_config_gpio(pfc, offset, PINMUX_TYPE_FUNCTION, GPIO_CFG_FREE); spin_unlock_irqrestore(&pfc->lock, flags); } |