summaryrefslogtreecommitdiff
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2019-07-05 17:30:43 +0300
committerLinus Walleij <linus.walleij@linaro.org>2019-07-29 01:20:09 +0300
commitb3a2b136011ef567f2b9cf55f559f38816c8a64d (patch)
tree02c6052ee24aaf96ceb26351f43e3937d0dfdace /Documentation/driver-api
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
downloadlinux-b3a2b136011ef567f2b9cf55f559f38816c8a64d.tar.xz
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>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/pinctl.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/driver-api/pinctl.rst b/Documentation/driver-api/pinctl.rst
index 2bb1bc484278..3d2deaf48841 100644
--- a/Documentation/driver-api/pinctl.rst
+++ b/Documentation/driver-api/pinctl.rst
@@ -638,8 +638,8 @@ group of pins would work something like this::
}
static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
- unsigned ** const pins,
- unsigned * const num_pins)
+ const unsigned ** pins,
+ unsigned * num_pins)
{
*pins = (unsigned *) foo_groups[selector].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);
- writeb((readb(MUX)|regbit), MUX)
+ writeb((readb(MUX)|regbit), MUX);
return 0;
}