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 <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2022-07-07 18:44:39 +02:00 committed by Carles Cufí
commit 700323dd3d

View file

@ -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), \
},