drivers: gpio: use new ngpios macros

Save some typing with sed:

$ git grep -E -l \
  'GPIO_PORT_PIN_MASK_FROM_NGPIOS\(DT_INST_PROP\(.*, ngpios\)\)' | \
  xargs sed -r -i \
  's/GPIO_PORT_PIN_MASK_FROM_NGPIOS\(DT_INST_PROP\(([0-9]+), ngpios\)\)/GPIO_PORT_PIN_MASK_FROM_DT_INST(\1)/'

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-04-03 15:58:00 -07:00 committed by Kumar Gala
commit 9f7cab0623
12 changed files with 43 additions and 43 deletions

View file

@ -381,7 +381,7 @@ static void gpio_sifive_cfg_0(void);
static const struct gpio_sifive_config gpio_sifive_config0 = {
.common = {
.port_pin_mask = GPIO_PORT_PIN_MASK_FROM_NGPIOS(DT_INST_PROP(0, ngpios)),
.port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(0),
},
.gpio_base_addr = DT_INST_REG_ADDR(0),
.gpio_irq_base = DT_INST_IRQN(0),