summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.org>2016-02-09 09:52:13 +0000
committerPhil Elwell <phil@raspberrypi.org>2016-02-09 10:00:30 +0000
commitca312f557513e057c456598528e663fe9d009498 (patch)
tree4a65ea40f51949a62fd362af778eec86e59c1432
parent4b56db768587edc106eee2ec4a406fc66030e4b7 (diff)
pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsingrpi-bootloader-1.20160209-1
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.
-rw-r--r--drivers/pinctrl/bcm/pinctrl-bcm2835.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 61ef002beb33..5821f465e502 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -818,7 +818,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
}
if (num_pulls) {
err = of_property_read_u32_index(np, "brcm,pull",
- (num_funcs > 1) ? i : 0, &pull);
+ (num_pulls > 1) ? i : 0, &pull);
if (err)
goto out;
err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin,