diff options
-rw-r--r-- | drivers/pinctrl/core.c | 4 |
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) return ret; } + mutex_lock(&pctldev->mutex); + /* Convert to the pin controllers number space */ pin = gpio_to_pin(range, gpio); ret = pinmux_request_gpio(pctldev, range, pin, gpio); + mutex_unlock(&pctldev->mutex); + return ret; } EXPORT_SYMBOL_GPL(pinctrl_request_gpio); |