summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 480beae..e299f14 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -276,22 +276,17 @@ static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
struct sh_pfc *pfc = gpio_to_pfc(gc);
unsigned int mark = pfc->info->func_gpios[offset].enum_id;
unsigned long flags;
- int ret = -EINVAL;
+ int ret;
pr_notice_once("Use of GPIO API for function requests is deprecated, convert to pinctrl\n");
if (mark == 0)
- return ret;
+ return -EINVAL;
spin_lock_irqsave(&pfc->lock, flags);
-
- if (sh_pfc_config_mux(pfc, mark, PINMUX_TYPE_FUNCTION))
- goto done;
-
- ret = 0;
-
-done:
+ ret = sh_pfc_config_mux(pfc, mark, PINMUX_TYPE_FUNCTION);
spin_unlock_irqrestore(&pfc->lock, flags);
+
return ret;
}
OpenPOWER on IntegriCloud