base-modem: clarify port cleanup/close behavior for serial ports

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-05-07 22:59:25 -05:00
parent 6b25476dbb
commit 6350b0a85f
+5
View File
@@ -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)) {