From 700323dd3dfea35b2caa7d8cbdf51f549960d0ad Mon Sep 17 00:00:00 2001 From: Johann Fischer Date: Thu, 7 Jul 2022 18:44:39 +0200 Subject: [PATCH] modbus: use DT_INST_PARENT instead of DT_INST_BUS Node is not a bus controller, use DT_INST_PARENT instead of DT_INST_BUS. Signed-off-by: Johann Fischer --- subsys/modbus/modbus_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/modbus/modbus_core.c b/subsys/modbus/modbus_core.c index 749f14ef08d..c8250d094f9 100644 --- a/subsys/modbus/modbus_core.c +++ b/subsys/modbus/modbus_core.c @@ -35,7 +35,7 @@ DT_INST_FOREACH_STATUS_OKAY(MB_RTU_DEFINE_GPIO_CFGS) (&prop##_cfg_##inst), (NULL)) #define MODBUS_DT_GET_SERIAL_DEV(inst) { \ - .dev = DEVICE_DT_GET(DT_INST_BUS(inst)), \ + .dev = DEVICE_DT_GET(DT_INST_PARENT(inst)), \ .de = MB_RTU_ASSIGN_GPIO_CFG(inst, de_gpios), \ .re = MB_RTU_ASSIGN_GPIO_CFG(inst, re_gpios), \ },