Skip to content

Commit 5bae1f0

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: at91: Make use of for_each_requested_gpio()
Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Ludovic Desroches <[email protected]> Cc: Nicolas Ferre <[email protected]> Cc: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 7796cdc commit 5bae1f0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/pinctrl/pinctrl-at91.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,14 +1486,11 @@ static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
14861486
int i;
14871487
struct at91_gpio_chip *at91_gpio = gpiochip_get_data(chip);
14881488
void __iomem *pio = at91_gpio->regbase;
1489+
const char *gpio_label;
14891490

1490-
for (i = 0; i < chip->ngpio; i++) {
1491+
for_each_requested_gpio(chip, i, gpio_label) {
14911492
unsigned mask = pin_to_mask(i);
1492-
const char *gpio_label;
14931493

1494-
gpio_label = gpiochip_is_requested(chip, i);
1495-
if (!gpio_label)
1496-
continue;
14971494
mode = at91_gpio->ops->get_periph(pio, mask);
14981495
seq_printf(s, "[%s] GPIO%s%d: ",
14991496
gpio_label, chip->label, i);

0 commit comments

Comments
 (0)