Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282132
b: refs/heads/master
c: d2f6a1c
h: refs/heads/master
v: v3
  • Loading branch information
Marek Belisko authored and Linus Walleij committed Jan 3, 2012
1 parent 89a29bb commit 1581854
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7afde8baa83b9ac409a6db86f27a41878aa6b33f
refs/heads/master: d2f6a1c6fb0e510a24ccac066eefbcfd0c932858
15 changes: 5 additions & 10 deletions trunk/drivers/pinctrl/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,18 @@ 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,
"pin is not registered so it cannot be requested\n");
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);
Expand Down

0 comments on commit 1581854

Please sign in to comment.