Skip to content

Commit da3f594

Browse files
geertuLinus Walleij
authored andcommitted
ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro
impd1_probe() fills in the GPIO lookup table by manually populating an array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper macro instead, to relax a dependency on the gpiod_lookup structure's member names. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200324135653.6676-1-geert+renesas@glider.be Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 5eefcae commit da3f594

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎arch/arm/mach-integrator/impd1.c‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,13 +410,10 @@ static int __ref impd1_probe(struct lm_device *dev)
410410
* 5 = Key lower right
411411
*/
412412
/* We need the two MMCI GPIO entries */
413-
lookup->table[0].chip_label = chipname;
414-
lookup->table[0].chip_hwnum = 3;
415-
lookup->table[0].con_id = "wp";
416-
lookup->table[1].chip_label = chipname;
417-
lookup->table[1].chip_hwnum = 4;
418-
lookup->table[1].con_id = "cd";
419-
lookup->table[1].flags = GPIO_ACTIVE_LOW;
413+
lookup->table[0] = (struct gpiod_lookup)
414+
GPIO_LOOKUP(chipname, 3, "wp", 0);
415+
lookup->table[1] = (struct gpiod_lookup)
416+
GPIO_LOOKUP(chipname, 4, "cd", GPIO_ACTIVE_LOW);
420417
gpiod_add_lookup_table(lookup);
421418
}
422419

0 commit comments

Comments
 (0)