提交 80fbc2d9 编写于 作者: S Shawn Guo 提交者: Linus Walleij

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: NShawn Guo <shawn.guo@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 dcbcc304
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册