提交 2c7e3306 编写于 作者: P Phil Elwell 提交者: Linus Walleij

pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing

The DT bindings for pinctrl-bcm2835 allow both the function and pull
to contain either one entry or one per pin. However, an error in the
DT parsing can cause failures if the number of pulls differs from the
number of functions.

Cc: stable@vger.kernel.org
Signed-off-by: NEric Anholt <eric@anholt.net>
Signed-off-by: NPhil Elwell <phil@raspberrypi.org>
Reviewed-by: NStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 0762ddd7
...@@ -779,7 +779,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, ...@@ -779,7 +779,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
} }
if (num_pulls) { if (num_pulls) {
err = of_property_read_u32_index(np, "brcm,pull", err = of_property_read_u32_index(np, "brcm,pull",
(num_funcs > 1) ? i : 0, &pull); (num_pulls > 1) ? i : 0, &pull);
if (err) if (err)
goto out; goto out;
err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin, err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册