Skip to content

Commit

Permalink
pinctrl: show pin name when request pins
Browse files Browse the repository at this point in the history
Pin name is more useful to users.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Dong Aisheng authored and Linus Walleij committed Apr 18, 2012
1 parent 6d4ca1f commit d0bd8df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/pinctrl/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,16 @@ static int pin_request(struct pinctrl_dev *pctldev,
const struct pinmux_ops *ops = pctldev->desc->pmxops;
int status = -EINVAL;

dev_dbg(pctldev->dev, "request pin %d for %s\n", pin, owner);

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;
}

dev_dbg(pctldev->dev, "request pin %d (%s) for %s\n",
pin, desc->name, owner);

if (gpio_range) {
/* There's no need to support multiple GPIO requests */
if (desc->gpio_owner) {
Expand Down

0 comments on commit d0bd8df

Please sign in to comment.