mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user