mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] pinmux: Remove double pin validity check.
@ 2011-10-26 20:57 Marek Belisko
  2011-10-26 20:57 ` [PATCH 2/2] pinmux: Unify pin type from signed to unsigned Marek Belisko
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Marek Belisko @ 2011-10-26 20:57 UTC (permalink / raw)
  To: swarren, linus.walleij; +Cc: grant.likely, linux-kernel, Marek Belisko

Function pin_is_valid just call pin_desc_get which is in pin_request
call some line below. Remove pin_is_valid() check.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/pinctrl/pinmux.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index a5467f8..b6d964f 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -112,16 +112,6 @@ static int pin_request(struct pinctrl_dev *pctldev,
 
 	dev_dbg(&pctldev->dev, "request pin %d for %s\n", pin, function);
 
-	if (!pin_is_valid(pctldev, pin)) {
-		dev_err(&pctldev->dev, "pin is invalid\n");
-		return -EINVAL;
-	}
-
-	if (!function) {
-		dev_err(&pctldev->dev, "no function name given\n");
-		return -EINVAL;
-	}
-
 	desc = pin_desc_get(pctldev, pin);
 	if (desc == NULL) {
 		dev_err(&pctldev->dev,
@@ -129,6 +119,11 @@ static int pin_request(struct pinctrl_dev *pctldev,
 		goto out;
 	}
 
+	if (!function) {
+		dev_err(&pctldev->dev, "no function name given\n");
+		return -EINVAL;
+	}
+
 	spin_lock(&desc->lock);
 	if (desc->mux_function) {
 		spin_unlock(&desc->lock);
-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-11-11 14:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-26 20:57 [PATCH 1/2] pinmux: Remove double pin validity check Marek Belisko
2011-10-26 20:57 ` [PATCH 2/2] pinmux: Unify pin type from signed to unsigned Marek Belisko
2011-10-26 21:06   ` David Rientjes
2011-10-27  6:13     ` Belisko Marek
2011-10-27 15:59       ` Stephen Warren
2011-10-28 19:53       ` Linus Walleij
2011-10-31 20:27         ` [PATH v2 " Marek Belisko
2011-11-11 14:38           ` Linus Walleij
2011-10-27 16:37 ` [PATCH 1/2] pinmux: Remove double pin validity check Stephen Warren
2011-10-27 18:39   ` Belisko Marek
2011-10-27 18:42     ` Stephen Warren
2011-10-28 19:47 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®