diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2017-05-22 15:59:35 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-05-29 10:16:16 +0200 |
commit | 80fbc2d9b3e9796133470069fa1a10fe2a755a7a (patch) | |
tree | 2e1669beeae1ec3630d4753a90cdc1e2f6cdd8f4 /drivers | |
parent | pinctrl: meson-gxbb: Add SPI pins for SPICC controller (diff) | |
download | linux-80fbc2d9b3e9796133470069fa1a10fe2a755a7a.tar.xz linux-80fbc2d9b3e9796133470069fa1a10fe2a755a7a.zip |
pinctrl: zte: fix group_desc initialization
There are a couple of issues with group_desc initialization in function
zx_pinctrl_build_state().
- num_pins is not initialized and remains zero.
- pins shouldn't be initialized with a pointer to variable in the
stack.
With them fixed, pin_request() in pinmux_enable_setting() can be invoked
correctly.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pinctrl/zte/pinctrl-zx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/zte/pinctrl-zx.c b/drivers/pinctrl/zte/pinctrl-zx.c index 2aca4e4b3f1c..787e3967bd5c 100644 --- a/drivers/pinctrl/zte/pinctrl-zx.c +++ b/drivers/pinctrl/zte/pinctrl-zx.c @@ -282,10 +282,10 @@ static int zx_pinctrl_build_state(struct platform_device *pdev) for (i = 0; i < ngroups; i++) { const struct pinctrl_pin_desc *pindesc = info->pins + i; struct group_desc *group = groups + i; - int id = pindesc->number; group->name = pindesc->name; - group->pins = &id; + group->pins = (int *) &pindesc->number; + group->num_pins = 1; radix_tree_insert(&pctldev->pin_group_tree, i, group); } |