From f21cda4fedcb6fc70b937d4b23a692a31b18990a Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 26 Jun 2017 22:20:05 +0100 Subject: [PATCH] unifying: Clear the feature map when a device is reprobed --- plugins/unifying/lu-device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/unifying/lu-device.c b/plugins/unifying/lu-device.c index f09e2fc76..10465ae4d 100644 --- a/plugins/unifying/lu-device.c +++ b/plugins/unifying/lu-device.c @@ -712,6 +712,12 @@ gboolean lu_device_probe (LuDevice *device, GError **error) { LuDeviceClass *klass = LU_DEVICE_GET_CLASS (device); + LuDevicePrivate *priv = GET_PRIVATE (device); + + /* clear the feature map (leaving only the root) */ + g_ptr_array_set_size (priv->feature_index, 1); + + /* probe the hardware */ if (klass->probe != NULL) return klass->probe (device, error); return TRUE;