elantp: fix missing initial value and remove duplicate code

This commit is contained in:
Josh Chen 2022-08-30 10:01:29 +08:00 committed by Mario Limonciello
parent 72f19f2a12
commit 5ed675f93b
2 changed files with 3 additions and 1 deletions

View File

@ -477,6 +477,9 @@ fu_elantp_hid_device_detach(FuDevice *device, FuProgress *progress, GError **err
} else {
iap_ver = fu_memread_uint16(buf, G_LITTLE_ENDIAN);
}
/* set the page size */
self->fw_page_size = 64;
if (ic_type >= 0x10) {
if (iap_ver >= 1) {
/* set the IAP type, presumably some kind of ABI */

View File

@ -327,7 +327,6 @@ fu_elantp_i2c_device_setup(FuDevice *device, GError **error)
G_LITTLE_ENDIAN,
error))
return FALSE;
fu_device_add_instance_u16(device, "MOD", self->module_id);
/* define the extra instance IDs */
fu_device_add_instance_u16(device, "VEN", vid);