diff options
-rw-r--r-- | src/linux/up-device-supply.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index c5222b5..91386cf 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -406,8 +406,7 @@ up_device_supply_sibling_discovered (UpDevice *device, g_free (serial_number); } - /* Fall back to "keyboard" if we don't find anything. */ - new_type = UP_DEVICE_KIND_KEYBOARD; + new_type = UP_DEVICE_KIND_UNKNOWN; for (i = 0; i < G_N_ELEMENTS (types); i++) { if (g_udev_device_get_property_as_boolean (input, types[i].prop)) { @@ -438,6 +437,10 @@ up_device_supply_sibling_discovered (UpDevice *device, * the model name. */ + /* Fall back to "keyboard" if we didn't find anything. */ + if (new_type == UP_DEVICE_KIND_UNKNOWN) + new_type = UP_DEVICE_KIND_KEYBOARD; + if (cur_type != new_type) g_object_set (device, "type", new_type, NULL); } |