pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing rpi-bootloader-1.20160209-1
authorPhil Elwell <phil@raspberrypi.org>
Tue, 9 Feb 2016 09:52:13 +0000 (09:52 +0000)
committerPhil Elwell <phil@raspberrypi.org>
Tue, 9 Feb 2016 10:00:30 +0000 (10:00 +0000)
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.

drivers/pinctrl/bcm/pinctrl-bcm2835.c

index 61ef002..5821f46 100644 (file)
@@ -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,