From: Axel Lin <axel.lin@ingics.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Patrice Chotard <patrice.chotard@st.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] pinctrl: core: Add proper mutex lock in pinctrl_request_gpio
Date: Mon, 19 Aug 2013 10:07:46 +0800 [thread overview]
Message-ID: <1376878066.10251.4.camel@phoenix> (raw)
In-Reply-To: <1376877989.10251.2.camel@phoenix>
This one is missed in commit 42fed7ba "pinctrl: move subsystem mutex to
pinctrl_dev struct".
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/pinctrl/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 53c40d9..92f86ab 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);
--
1.8.1.2
next prev parent reply other threads:[~2013-08-19 2:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 2:06 [PATCH 1/2] pinctrl: core: Remove unnecessary test for desc->name Axel Lin
2013-08-19 2:07 ` Axel Lin [this message]
2013-08-21 21:42 ` [PATCH 2/2] pinctrl: core: Add proper mutex lock in pinctrl_request_gpio Linus Walleij
2013-08-22 3:41 ` Axel Lin
2013-08-28 11:13 ` Linus Walleij
2013-08-21 21:31 ` [PATCH 1/2] pinctrl: core: Remove unnecessary test for desc->name Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376878066.10251.4.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrice.chotard@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.