diff --git a/src/fu-provider-chug.c b/src/fu-provider-chug.c index fe8f6a6f2..dd726631b 100644 --- a/src/fu-provider-chug.c +++ b/src/fu-provider-chug.c @@ -53,7 +53,6 @@ typedef struct { GUsbDevice *usb_device; gboolean got_version; gboolean is_bootloader; - gboolean persist_after_unplug; guint timeout_open_id; guint reconnect_id; GBytes *fw_bin; @@ -171,7 +170,6 @@ fu_provider_chug_get_firmware_version (FuProviderChugItem *item) if (tmp != NULL) { item->got_version = TRUE; g_debug ("obtained fwver using extension '%s'", tmp); - item->persist_after_unplug = FALSE; fu_device_set_metadata (item->device, FU_DEVICE_KEY_VERSION, tmp); goto out; @@ -180,7 +178,6 @@ fu_provider_chug_get_firmware_version (FuProviderChugItem *item) g_usb_device_close (item->usb_device, NULL); /* attempt to open the device and get the serial number */ - item->persist_after_unplug = TRUE; if (!ch_device_open (item->usb_device, &error)) { g_debug ("Failed to claim interface, polling: %s", error->message); return; @@ -582,12 +579,6 @@ fu_provider_chug_device_removed_cb (GUsbContext *ctx, item->timeout_open_id = 0; } fu_provider_device_remove (FU_PROVIDER (provider_chug), item->device); - - /* if we got the version from an extension then it's best to - * rescan each time so we don't get confused when different - * kinds of ColorHug device are plugged in... */ - if (!item->persist_after_unplug) - g_hash_table_remove (priv->devices, platform_id); } /**