Skip to content

Commit

Permalink
docs/pinctrl: fix pinctrl_select_state examples
Browse files Browse the repository at this point in the history
The function requires two arguments.

Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
Link: https://lore.kernel.org/r/20221101205159.1468069-2-lis8215@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
SiarheiVolkau authored and linusw committed Nov 9, 2022
1 parent 97775eb commit c1542be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Documentation/driver-api/pin-control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ default state like this::
return PTR_ERR(foo->s);
}

ret = pinctrl_select_state(foo->s);
ret = pinctrl_select_state(foo->p, foo->s);
if (ret < 0) {
/* FIXME: clean up "foo" here */
return ret;
Expand Down Expand Up @@ -1411,14 +1411,14 @@ on the pins defined by group B::
foo_switch()
{
/* Enable on position A */
ret = pinctrl_select_state(s1);
ret = pinctrl_select_state(p, s1);
if (ret < 0)
...

...

/* Enable on position B */
ret = pinctrl_select_state(s2);
ret = pinctrl_select_state(p, s2);
if (ret < 0)
...

Expand Down

0 comments on commit c1542be

Please sign in to comment.