base-manager,device: consolidate modem cancelling into mm_device_remove_modem()

Every use of mm_device_remove_modem() was already trying to cancel the
modem's canellable, so let's just put it there and simplify the callers.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-05-07 22:59:51 -05:00
parent f4cbca56d5
commit e0c0c68688
2 changed files with 1 additions and 10 deletions
+1 -1
View File
@@ -503,6 +503,7 @@ mm_device_remove_modem (MMDevice *self,
}
unexport_modem (self);
g_cancellable_cancel (mm_base_modem_peek_cancellable (self->priv->modem));
mm_base_modem_teardown_ports (self->priv->modem,
(GAsyncReadyCallback)teardown_ports_ready,
task);
@@ -831,7 +832,6 @@ inhibit_disable_ready (MMBaseModem *modem,
return;
}
g_cancellable_cancel (mm_base_modem_peek_cancellable (modem));
mm_device_remove_modem (self,
(GAsyncReadyCallback)inhibit_disable_modem_remove_ready,
task);