diff options
author | Marek Belisko <marek.belisko@open-nandra.com> | 2011-10-26 22:57:20 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-01-03 09:09:59 +0100 |
commit | d2f6a1c6fb0e510a24ccac066eefbcfd0c932858 (patch) | |
tree | a5180b9b911b32508c6423852a5419110bf5b821 /drivers/pinctrl | |
parent | 7afde8baa83b9ac409a6db86f27a41878aa6b33f (diff) |
pinctrl: remove double pin validity check.
Function pin_is_valid just call pin_desc_get which is in pin_request
call some line below. Remove pin_is_valid() check.
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | 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 72b760bc880a..17c3931d5ef0 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -108,16 +108,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, @@ -125,6 +115,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); |