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 <luca@lucaceresoli.net>
Link: https://lore.kernel.org/r/20190705143043.1929-1-luca@lucaceresoli.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Luca Ceresoli 2019-07-05 16:30:43 +02:00 committed by Linus Walleij
parent 5f9e832c13
commit b3a2b13601

View File

@ -638,8 +638,8 @@ group of pins would work something like this::
} }
static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
unsigned ** const pins, const unsigned ** pins,
unsigned * const num_pins) unsigned * num_pins)
{ {
*pins = (unsigned *) foo_groups[selector].pins; *pins = (unsigned *) foo_groups[selector].pins;
*num_pins = foo_groups[selector].num_pins; *num_pins = foo_groups[selector].num_pins;
@ -705,7 +705,7 @@ group of pins would work something like this::
{ {
u8 regbit = (1 << selector + group); u8 regbit = (1 << selector + group);
writeb((readb(MUX)|regbit), MUX) writeb((readb(MUX)|regbit), MUX);
return 0; return 0;
} }