Skip to content

Commit 01b5e34

Browse files
andy-shevgclement
authored andcommitted
ARM: orion/gpio: 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: Jason Cooper <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Sebastian Hesselbarth <[email protected]> Cc: Gregory Clement <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Gregory CLEMENT <[email protected]>
1 parent b3a9e3b commit 01b5e34

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

arch/arm/plat-orion/gpio.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
442442

443443
struct orion_gpio_chip *ochip = gpiochip_get_data(chip);
444444
u32 out, io_conf, blink, in_pol, data_in, cause, edg_msk, lvl_msk;
445+
const char *label;
445446
int i;
446447

447448
out = readl_relaxed(GPIO_OUT(ochip));
@@ -453,15 +454,10 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
453454
edg_msk = readl_relaxed(GPIO_EDGE_MASK(ochip));
454455
lvl_msk = readl_relaxed(GPIO_LEVEL_MASK(ochip));
455456

456-
for (i = 0; i < chip->ngpio; i++) {
457-
const char *label;
457+
for_each_requested_gpio(chip, i, label) {
458458
u32 msk;
459459
bool is_out;
460460

461-
label = gpiochip_is_requested(chip, i);
462-
if (!label)
463-
continue;
464-
465461
msk = 1 << i;
466462
is_out = !(io_conf & msk);
467463

0 commit comments

Comments
 (0)