summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2020-07-24 16:10:57 +0200
committerArnd Bergmann <arnd@arndb.de>2020-07-24 16:11:14 +0200
commit0e3a4cb128121dce841d84bbff7509b2a36cdb7b (patch)
tree1952e6b24263980dabfe41b2dc808dba2709b573 /arch/arm
parent92607f8a4451b5836f3add699633d35bb8aa5ffe (diff)
parent01b5e34518675fc02673ac8c0e11dcffb3a0100e (diff)
downloadlinux-0e3a4cb128121dce841d84bbff7509b2a36cdb7b.tar.bz2
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 <arnd@arndb.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-orion/gpio.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 26a531ebb6e9..734f0be4f14a 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -442,6 +442,7 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
struct orion_gpio_chip *ochip = gpiochip_get_data(chip);
u32 out, io_conf, blink, in_pol, data_in, cause, edg_msk, lvl_msk;
+ const char *label;
int i;
out = readl_relaxed(GPIO_OUT(ochip));
@@ -453,15 +454,10 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
edg_msk = readl_relaxed(GPIO_EDGE_MASK(ochip));
lvl_msk = readl_relaxed(GPIO_LEVEL_MASK(ochip));
- for (i = 0; i < chip->ngpio; i++) {
- const char *label;
+ for_each_requested_gpio(chip, i, label) {
u32 msk;
bool is_out;
- label = gpiochip_is_requested(chip, i);
- if (!label)
- continue;
-
msk = 1 << i;
is_out = !(io_conf & msk);