diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-06-21 00:15:07 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-06-21 00:15:07 +0300 |
commit | 435fda26d70379ccb272b880d2e43bff79fcba27 (patch) | |
tree | ea5d480d9cdeb4982868ae692bc350377b1f0dc4 /drivers/pinctrl | |
parent | b1a05ba9ae8cf6592e1d1f3e7b03bf8e5863f75f (diff) | |
parent | 5bae1f08e2853d17ce2ceeca71fe5a3ee03a0a69 (diff) | |
download | linux-435fda26d70379ccb272b880d2e43bff79fcba27.tar.xz |
Merge branch 'ib-for-each-requested' of /home/linus/linux-gpio into devel
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 52386ad29f28..9c5213087659 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1486,14 +1486,11 @@ static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) int i; struct at91_gpio_chip *at91_gpio = gpiochip_get_data(chip); void __iomem *pio = at91_gpio->regbase; + const char *gpio_label; - for (i = 0; i < chip->ngpio; i++) { + for_each_requested_gpio(chip, i, gpio_label) { unsigned mask = pin_to_mask(i); - const char *gpio_label; - gpio_label = gpiochip_is_requested(chip, i); - if (!gpio_label) - continue; mode = at91_gpio->ops->get_periph(pio, mask); seq_printf(s, "[%s] GPIO%s%d: ", gpio_label, chip->label, i); |