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>
This commit is contained in:
Marek Belisko 2011-10-26 22:57:20 +02:00 committed by Linus Walleij
parent 7afde8baa8
commit d2f6a1c6fb
1 changed files with 5 additions and 10 deletions

View File

@ -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);