summaryrefslogtreecommitdiff
path: root/src/linux/up-device-unifying.c
diff options
context:
space:
mode:
authorArkadiusz Miśkiewicz <arekm@maven.pl>2013-03-21 20:40:26 +0100
committerRichard Hughes <richard@hughsie.com>2013-03-22 19:43:50 +0000
commitfd0286e871bcf67d29aa622b66ecf362fe2d6ec0 (patch)
tree3e418c494b1e685e79bffc016a41167d5fd1f0e4 /src/linux/up-device-unifying.c
parente571f840e9fd945c94bc1c5fa494fde9d23fa2ad (diff)
downloadupower-fd0286e871bcf67d29aa622b66ecf362fe2d6ec0.tar.gz
Repair vendor handling for Logitech Unifying devices
Set proper vendor via udev rules for unifying devices and handle that in code. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com>
Diffstat (limited to 'src/linux/up-device-unifying.c')
-rw-r--r--src/linux/up-device-unifying.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/linux/up-device-unifying.c b/src/linux/up-device-unifying.c
index 4b659c3..633909f 100644
--- a/src/linux/up-device-unifying.c
+++ b/src/linux/up-device-unifying.c
@@ -123,6 +123,7 @@ up_device_unifying_coldplug (UpDevice *device)
const gchar *bus_address;
const gchar *device_file;
const gchar *type;
+ const gchar *vendor;
gboolean ret = FALSE;
gchar *endptr = NULL;
gchar *tmp;
@@ -198,9 +199,13 @@ up_device_unifying_coldplug (UpDevice *device)
goto out;
}
+ vendor = g_udev_device_get_property (native, "UPOWER_VENDOR");
+ if (vendor == NULL)
+ vendor = g_udev_device_get_property (native, "ID_VENDOR");
+
/* set some default values */
g_object_set (device,
- "vendor", g_udev_device_get_property (native, "ID_VENDOR"),
+ "vendor", vendor,
"type", up_device_unifying_get_device_kind (unifying),
"model", hidpp_device_get_model (unifying->priv->hidpp_device),
"has-history", TRUE,