aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 7094a8129008..054d14b43db4 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -562,11 +562,15 @@ int pinctrl_request_gpio(unsigned gpio)
562 return ret; 562 return ret;
563 } 563 }
564 564
565 mutex_lock(&pctldev->mutex);
566
565 /* Convert to the pin controllers number space */ 567 /* Convert to the pin controllers number space */
566 pin = gpio_to_pin(range, gpio); 568 pin = gpio_to_pin(range, gpio);
567 569
568 ret = pinmux_request_gpio(pctldev, range, pin, gpio); 570 ret = pinmux_request_gpio(pctldev, range, pin, gpio);
569 571
572 mutex_unlock(&pctldev->mutex);
573
570 return ret; 574 return ret;
571} 575}
572EXPORT_SYMBOL_GPL(pinctrl_request_gpio); 576EXPORT_SYMBOL_GPL(pinctrl_request_gpio);