drivers: gpio: mchp_xec_v2: use instance based macros

Replace usage of DT_DRV_INST with instance based macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-12-16 10:34:08 +01:00 committed by Carles Cufí
commit 4e7b4e65af

View file

@ -380,12 +380,12 @@ static const struct gpio_driver_api gpio_xec_driver_api = {
}; };
#define XEC_GPIO_PORT_FLAGS(n) \ #define XEC_GPIO_PORT_FLAGS(n) \
((DT_IRQ_HAS_CELL(DT_DRV_INST(n), irq)) ? GPIO_INT_ENABLE : 0) ((DT_INST_IRQ_HAS_CELL(n, irq)) ? GPIO_INT_ENABLE : 0)
#define XEC_GPIO_PORT(n) \ #define XEC_GPIO_PORT(n) \
static int gpio_xec_port_init_##n(const struct device *dev) \ static int gpio_xec_port_init_##n(const struct device *dev) \
{ \ { \
if (!(DT_IRQ_HAS_CELL(DT_DRV_INST(n), irq))) { \ if (!(DT_INST_IRQ_HAS_CELL(n, irq))) { \
return 0; \ return 0; \
} \ } \
\ \