mirror of
https://git.proxmox.com/git/fwupd
synced 2025-06-08 18:27:42 +00:00
modem-manager: Set the context when the device is constructed
This commit is contained in:
parent
ec5d35ca8c
commit
e21fb7630a
@ -1552,9 +1552,9 @@ fu_mm_device_class_init(FuMmDeviceClass *klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FuMmDevice *
|
FuMmDevice *
|
||||||
fu_mm_device_new(MMManager *manager, MMObject *omodem)
|
fu_mm_device_new(FuContext *ctx, MMManager *manager, MMObject *omodem)
|
||||||
{
|
{
|
||||||
FuMmDevice *self = g_object_new(FU_TYPE_MM_DEVICE, NULL);
|
FuMmDevice *self = g_object_new(FU_TYPE_MM_DEVICE, "context", ctx, NULL);
|
||||||
self->manager = g_object_ref(manager);
|
self->manager = g_object_ref(manager);
|
||||||
self->omodem = g_object_ref(omodem);
|
self->omodem = g_object_ref(omodem);
|
||||||
self->port_at_ifnum = -1;
|
self->port_at_ifnum = -1;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
G_DECLARE_FINAL_TYPE(FuMmDevice, fu_mm_device, FU, MM_DEVICE, FuDevice)
|
G_DECLARE_FINAL_TYPE(FuMmDevice, fu_mm_device, FU, MM_DEVICE, FuDevice)
|
||||||
|
|
||||||
FuMmDevice *
|
FuMmDevice *
|
||||||
fu_mm_device_new(MMManager *manager, MMObject *omodem);
|
fu_mm_device_new(FuContext *ctx, MMManager *manager, MMObject *omodem);
|
||||||
const gchar *
|
const gchar *
|
||||||
fu_mm_device_get_inhibition_uid(FuMmDevice *device);
|
fu_mm_device_get_inhibition_uid(FuMmDevice *device);
|
||||||
const gchar *
|
const gchar *
|
||||||
|
@ -223,7 +223,7 @@ fu_plugin_mm_device_add(FuPlugin *plugin, MMObject *modem)
|
|||||||
g_warning("MM device already added, ignoring");
|
g_warning("MM device already added, ignoring");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dev = fu_mm_device_new(priv->manager, modem);
|
dev = fu_mm_device_new(fu_plugin_get_context(plugin), priv->manager, modem);
|
||||||
if (!fu_device_setup(FU_DEVICE(dev), &error)) {
|
if (!fu_device_setup(FU_DEVICE(dev), &error)) {
|
||||||
g_warning("failed to probe MM device: %s", error->message);
|
g_warning("failed to probe MM device: %s", error->message);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user