Skip to content

Commit b3a2b13

Browse files
lucaceresolilinusw
authored andcommitted
docs/pinctrl: fix compile errors in example code
The code in the example does not build for a few trivial errors: type mismatch in callback, missing semicolon. Fix them to help newcomers using the example as a starting point. Signed-off-by: Luca Ceresoli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 5f9e832 commit b3a2b13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/driver-api/pinctl.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,8 @@ group of pins would work something like this::
638638
}
639639

640640
static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
641-
unsigned ** const pins,
642-
unsigned * const num_pins)
641+
const unsigned ** pins,
642+
unsigned * num_pins)
643643
{
644644
*pins = (unsigned *) foo_groups[selector].pins;
645645
*num_pins = foo_groups[selector].num_pins;
@@ -705,7 +705,7 @@ group of pins would work something like this::
705705
{
706706
u8 regbit = (1 << selector + group);
707707

708-
writeb((readb(MUX)|regbit), MUX)
708+
writeb((readb(MUX)|regbit), MUX);
709709
return 0;
710710
}
711711

0 commit comments

Comments
 (0)