Browse Source

drivers: gpio: xlnx_ps: use DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP

Simplify driver by using DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP (avoids
DT_DRV_INST and auxiliary macro).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
pull/49699/head
Gerard Marull-Paretas 3 years ago committed by Carles Cufí
parent
commit
9c8cd560f0
  1. 3
      drivers/gpio/gpio_xlnx_ps.c

3
drivers/gpio/gpio_xlnx_ps.c

@ -94,11 +94,10 @@ static void gpio_xlnx_ps_isr(const struct device *dev) @@ -94,11 +94,10 @@ static void gpio_xlnx_ps_isr(const struct device *dev)
* devices for the parent controller device's config data struct
* specified in the device tree.
*/
#define GPIO_XLNX_PS_CHILD_CONCAT(idx) DEVICE_DT_GET(idx),
#define GPIO_XLNX_PS_GEN_BANK_ARRAY(idx)\
static const struct device *const gpio_xlnx_ps##idx##_banks[] = {\
DT_FOREACH_CHILD_STATUS_OKAY(DT_DRV_INST(idx), GPIO_XLNX_PS_CHILD_CONCAT)\
DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP(idx, DEVICE_DT_GET, (,))\
};
/* Device config & run-time data struct creation macros */

Loading…
Cancel
Save