0143-pinctrl-bcm2835-Fix-cut-and-paste-error-in-pull-pars.patch 952 B

12345678910111213141516171819202122232425
  1. From 5e3168449aa5a105df7043bfeb425b4dd929dea6 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <[email protected]>
  3. Date: Tue, 9 Feb 2016 09:52:13 +0000
  4. Subject: [PATCH 143/232] pinctrl-bcm2835: Fix cut-and-paste error in "pull"
  5. parsing
  6. The DT bindings for pinctrl-bcm2835 allow both the function and pull
  7. to contain either one entry or one per pin. However, an error in the
  8. DT parsing can cause failures if the number of pulls differs from the
  9. number of functions.
  10. ---
  11. drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
  14. +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
  15. @@ -802,7 +802,7 @@ static int bcm2835_pctl_dt_node_to_map(s
  16. }
  17. if (num_pulls) {
  18. err = of_property_read_u32_index(np, "brcm,pull",
  19. - (num_funcs > 1) ? i : 0, &pull);
  20. + (num_pulls > 1) ? i : 0, &pull);
  21. if (err)
  22. goto out;
  23. err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin,