diff options
| author | Jonas Karlman <jonas@kwiboo.se> | 2024-05-10 19:35:51 +0000 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2024-05-17 12:52:15 -0600 | 
| commit | 31cf22099bc3243ba2779d55fba0282bbcf29ddf (patch) | |
| tree | 8eeb7e2664ad661476f4609e663f7e51df715d90 /drivers/mmc/mmc_boot.c | |
| parent | a10e08a9a3cb85a2e797b8e0683da9049f8792f8 (diff) | |
pinctrl: Fix pinctrl_gpio_get_pinctrl_and_offset()
Linux kernel Documentation/devicetree/bindings/gpio/gpio.txt define the
format of the gpio-ranges prop as:
  The format is: <[pin controller phandle], [GPIO controller offset],
                  [pin controller offset], [number of pins]>;
  Example:
      gpio-ranges = <&foo 0 20 10>, <&bar 10 50 20>;
  This means:
  - pins 20..29 on pin controller "foo" is mapped to GPIO line 0..9 and
  - pins 50..69 on pin controller "bar" is mapped to GPIO line 10..29
For this example, a call to pinctrl_gpio_get_pinctrl_and_offset() using
offset 10 incorrectly return pin controller "foo" instead of "bar".
Fix this by using an exclusive range check.
Fixes: d0bb00adccb8 ("pinctrl: fix pinctrl_gpio_get_pinctrl_and_offset for gpio-ranges array")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quanyang Wang <quanyang.wang@windriver.com>
Diffstat (limited to 'drivers/mmc/mmc_boot.c')
0 files changed, 0 insertions, 0 deletions
