* [PATCH v2 14/29] sh-pfc: Don't needlessly check GPIO type in sh_gpio_free()
@ 2013-01-09 0:52 Laurent Pinchart
0 siblings, 0 replies; only message in thread
From: Laurent Pinchart @ 2013-01-09 0:52 UTC (permalink / raw)
To: linux-sh
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>
---
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 80a50d8..8f01113 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);
}
--
1.7.8.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-09 0:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 0:52 [PATCH v2 14/29] sh-pfc: Don't needlessly check GPIO type in sh_gpio_free() Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).