Skip to content

Commit 38e827d

Browse files
gmarullcarlescufi
authored andcommitted
drivers: gpio: mcp230xx: use instance based macros
Replace usage of DT_DRV_INST(n) with instance based macros where possible. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 4e7b4e6 commit 38e827d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio_mcp230xx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ static int mcp230xx_bus_is_ready(const struct device *dev)
8585
static struct mcp23xxx_config mcp230xx_##inst##_config = { \
8686
.config = { \
8787
.port_pin_mask = \
88-
GPIO_PORT_PIN_MASK_FROM_DT_NODE(DT_DRV_INST(n)), \
88+
GPIO_PORT_PIN_MASK_FROM_DT_INST(n), \
8989
}, \
9090
.bus = \
9191
{ \
92-
.i2c = I2C_DT_SPEC_GET(DT_DRV_INST(n)) \
92+
.i2c = I2C_DT_SPEC_INST_GET(n) \
9393
}, \
94-
.ngpios = DT_PROP(DT_DRV_INST(n), ngpios), \
94+
.ngpios = DT_INST_PROP(n, ngpios), \
9595
.read_fn = mcp230xx_read_port_regs, \
9696
.write_fn = mcp230xx_write_port_regs, \
9797
.bus_fn = mcp230xx_bus_is_ready \

0 commit comments

Comments
 (0)