pinctrl: zte: fix group_desc initialization
Subsystems (2)
PATCH 1/1 pinctrl: zte: fix group_desc initialization
From: Shawn Guo <[email protected]>
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.
---
Hi Linus,
This is a fix for ZTE pinctrl driver that is queued on your devel branch.
Shawn
drivers/pinctrl/zte/pinctrl-zx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/zte/pinctrl-zx.c +2 -2
@@ -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); }
Signature · 1 line
1.9.1
PATCH 1/1 pinctrl: zte: fix group_desc initialization
Quoted 5 lines · Shawn Guo
From: Shawn Guo <[email protected]>
There are a couple of issues with
group_descinitialization in functionzx_pinctrl_build_state().
Quoted 8 lines
-
num_pinsis not initialized and remains zero.
- pins shouldn't be initialized with a pointer to variable in the stack.With them fixed,
pin_request()inpinmux_enable_setting()can be invoked correctly.Signed-off-by Shawn Guo <[email protected]>
Patch applied.
Yours,
Linus Walleij