modbus: Remove mode reset in modbus_disable function

Remove reset mode in modbus_disable.

Signed-off-by: Jean Nanchen <jean.nanchen@gmail.com>
This commit is contained in:
Jean Nanchen 2024-01-15 09:11:07 +00:00 committed by Fabio Baltieri
parent 0176a27474
commit 80f7d518c6

View file

@ -398,7 +398,6 @@ int modbus_disable(const uint8_t iface)
k_work_cancel_sync(&ctx->server_work, &work_sync);
ctx->rxwait_to = 0;
ctx->unit_id = 0;
ctx->mode = MODBUS_MODE_RTU;
ctx->mbs_user_cb = NULL;
atomic_clear_bit(&ctx->state, MODBUS_STATE_CONFIGURED);