logitech-hidpp: Add the Model ID instance ID before getting firmware versions

This will allow us to create a device-radio child in the future.
This commit is contained in:
Richard Hughes 2021-09-01 12:32:01 +01:00
parent 0792ac0477
commit 91536c5638

View File

@ -742,6 +742,10 @@ fu_logitech_hidpp_device_setup(FuDevice *device, GError **error)
}
}
/* get the model ID, typically something like B3630000000000 */
if (!fu_logitech_hidpp_device_fetch_model_id(self, error))
return FALSE;
/* get the firmware information */
if (!fu_logitech_hidpp_device_fetch_firmware_info(self, error))
return FALSE;
@ -750,10 +754,6 @@ fu_logitech_hidpp_device_setup(FuDevice *device, GError **error)
if (!fu_logitech_hidpp_device_fetch_battery_level(self, error))
return FALSE;
/* get the model ID, typically something like B3630000000000 */
if (!fu_logitech_hidpp_device_fetch_model_id(self, error))
return FALSE;
/* try using HID++2.0 */
idx = fu_logitech_hidpp_device_feature_get_idx(self, HIDPP_FEATURE_GET_DEVICE_NAME_TYPE);
if (idx != 0x00) {