From de61d27259d74d63b43487cfad4fa80d75ed70f8 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 24 Mar 2020 15:31:07 +0000 Subject: [PATCH] ccgx: Read the FwAppType from the hardware --- plugins/ccgx/fu-ccgx-hpi-device.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/ccgx/fu-ccgx-hpi-device.c b/plugins/ccgx/fu-ccgx-hpi-device.c index d876a5eda..5b42f117d 100644 --- a/plugins/ccgx/fu-ccgx-hpi-device.c +++ b/plugins/ccgx/fu-ccgx-hpi-device.c @@ -456,6 +456,7 @@ fu_ccgx_hpi_device_setup (FuDevice *device, GError **error) 0x0c, &ver_fw1, G_LITTLE_ENDIAN, error)) return FALSE; + self->fw_app_type = ver_fw1 & 0xffff; if (!fu_common_read_uint32_safe (bufver, sizeof(bufver), 0x14, &ver_fw2, G_LITTLE_ENDIAN, error)) @@ -496,18 +497,6 @@ fu_ccgx_hpi_device_set_quirk_kv (FuDevice *device, "invalid SiliconId"); return FALSE; } - if (g_strcmp0 (key, "FwAppType") == 0) { - guint64 tmp = fu_common_strtoull (value); - if (tmp < G_MAXUINT16) { - self->fw_app_type = tmp; - return TRUE; - } - g_set_error_literal (error, - G_IO_ERROR, - G_IO_ERROR_INVALID_DATA, - "invalid FwAppType"); - return FALSE; - } if (g_strcmp0 (key, "FlashRowSize") == 0) { guint64 tmp = fu_common_strtoull (value); if (tmp < G_MAXUINT32) {