Skip to content

Commit

Permalink
ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
geertu authored and linusw committed Mar 26, 2020
1 parent 5eefcae commit da3f594
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions arch/arm/mach-integrator/impd1.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,10 @@ static int __ref impd1_probe(struct lm_device *dev)
* 5 = Key lower right
*/
/* We need the two MMCI GPIO entries */
lookup->table[0].chip_label = chipname;
lookup->table[0].chip_hwnum = 3;
lookup->table[0].con_id = "wp";
lookup->table[1].chip_label = chipname;
lookup->table[1].chip_hwnum = 4;
lookup->table[1].con_id = "cd";
lookup->table[1].flags = GPIO_ACTIVE_LOW;
lookup->table[0] = (struct gpiod_lookup)
GPIO_LOOKUP(chipname, 3, "wp", 0);
lookup->table[1] = (struct gpiod_lookup)
GPIO_LOOKUP(chipname, 4, "cd", GPIO_ACTIVE_LOW);
gpiod_add_lookup_table(lookup);
}

Expand Down

0 comments on commit da3f594

Please sign in to comment.