mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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:
parent
7afde8baa8
commit
d2f6a1c6fb
1 changed files with 5 additions and 10 deletions
|
@ -108,16 +108,6 @@ static int pin_request(struct pinctrl_dev *pctldev,
|
||||||
|
|
||||||
dev_dbg(&pctldev->dev, "request pin %d for %s\n", pin, function);
|
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);
|
desc = pin_desc_get(pctldev, pin);
|
||||||
if (desc == NULL) {
|
if (desc == NULL) {
|
||||||
dev_err(&pctldev->dev,
|
dev_err(&pctldev->dev,
|
||||||
|
@ -125,6 +115,11 @@ static int pin_request(struct pinctrl_dev *pctldev,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function) {
|
||||||
|
dev_err(&pctldev->dev, "no function name given\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
spin_lock(&desc->lock);
|
spin_lock(&desc->lock);
|
||||||
if (desc->mux_function) {
|
if (desc->mux_function) {
|
||||||
spin_unlock(&desc->lock);
|
spin_unlock(&desc->lock);
|
||||||
|
|
Loading…
Reference in a new issue