From 9c8cd560f091459325c4d5fe3936760b51e231f9 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Wed, 6 Jul 2022 14:06:09 +0200 Subject: [PATCH] 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 --- drivers/gpio/gpio_xlnx_ps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpio_xlnx_ps.c b/drivers/gpio/gpio_xlnx_ps.c index e1f7e729bd0..22eadcf8037 100644 --- a/drivers/gpio/gpio_xlnx_ps.c +++ b/drivers/gpio/gpio_xlnx_ps.c @@ -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 */