intel-usb4: Implement FuDevice->set_progress() to avoid a warning

This commit is contained in:
Richard Hughes 2023-02-20 11:20:09 +00:00 committed by Mario Limonciello
parent e7a028b402
commit 619f67276c

View File

@ -545,6 +545,16 @@ fu_intel_usb4_device_to_string(FuDevice *device, guint idt, GString *str)
fu_string_append_kx(str, idt, "NvmDeviceId", self->nvm_device_id);
}
static void
fu_thunderbolt_device_set_progress(FuDevice *self, FuProgress *progress)
{
fu_progress_set_id(progress, G_STRLOC);
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_RESTART, 0, "detach");
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_WRITE, 78, "write");
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_RESTART, 22, "attach");
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_BUSY, 0, "reload");
}
static void
fu_intel_usb4_device_init(FuIntelUsb4Device *self)
{
@ -566,4 +576,5 @@ fu_intel_usb4_device_class_init(FuIntelUsb4DeviceClass *klass)
klass_device->prepare_firmware = fu_intel_usb4_device_prepare_firmware;
klass_device->write_firmware = fu_intel_usb4_device_write_firmware;
klass_device->activate = fu_intel_usb4_device_activate;
klass_device->set_progress = fu_thunderbolt_device_set_progress;
}