Skip to content

Commit 0e3a4cb

Browse files
committed
Merge tag 'mvebu-arm-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/soc
mvebu arm for 5.9 (part 1) Use of for_each_requested_gpio() for gpio driver still in plat-orion for non DT platform. * tag 'mvebu-arm-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: orion/gpio: Make use of for_each_requested_gpio() Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 92607f8 + 01b5e34 commit 0e3a4cb

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)