From 6350b0a85f76e830b3749933c4ee7e926c8686ad Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 May 2025 22:58:17 -0500 Subject: base-modem: clarify port cleanup/close behavior for serial ports Signed-off-by: Dan Williams --- src/mm-base-modem.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c index a7fdfa0a..16f3e07b 100644 --- a/src/mm-base-modem.c +++ b/src/mm-base-modem.c @@ -2303,6 +2303,11 @@ cleanup_modem_port (MMBaseModem *self, if (ctx) teardown_context_ref (ctx); + /* No need to close serial ports here as they do not require a specific + * shutdown procedure with message exchanges and callbacks. They will be + * closed when the modem is invalidated or disposed. + */ + #if defined WITH_MBIM /* We need to close the MBIM port cleanly when disposing the modem object */ if (MM_IS_PORT_MBIM (port)) { -- cgit v1.2.3-70-g09d2