summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Miśkiewicz <arekm@maven.pl>2013-03-20 17:51:14 +0100
committerRichard Hughes <richard@hughsie.com>2013-03-21 16:23:45 +0000
commit232d70155c45d24afabe47ed37954cc000678295 (patch)
treec83ede1c44ff4ca6a97bbb93339d869f5f22a316
parent1540b08f9c18a395e6b84b6f347f998c16f9fb03 (diff)
downloadupower-232d70155c45d24afabe47ed37954cc000678295.tar.gz
Find hidraw devices correctly with systemd udev >= v196.
udev v196 libraries changed behaviour of g_udev_device_get_sysfs_attr() by stopping following symlinks for "device" attribute [1]. That change broke hiddev finding for unifying devices. Fix that by getting sysfs path from parent hiddev device. 1. http://cgit.freedesktop.org/systemd/systemd/commit/?id=5ae18ddc0d86673520c0dd6b59ccac8afc8aa605 Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com>
-rw-r--r--src/linux/up-device-unifying.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/up-device-unifying.c b/src/linux/up-device-unifying.c
index c7f0103..4b659c3 100644
--- a/src/linux/up-device-unifying.c
+++ b/src/linux/up-device-unifying.c
@@ -165,7 +165,7 @@ up_device_unifying_coldplug (UpDevice *device)
hidraw_list = g_udev_client_query_by_subsystem (client, "hidraw");
for (l = hidraw_list; l != NULL; l = l->next) {
if (g_strcmp0 (g_udev_device_get_sysfs_path (parent),
- g_udev_device_get_sysfs_attr (l->data, "device")) == 0) {
+ g_udev_device_get_sysfs_path(g_udev_device_get_parent(l->data))) == 0) {
receiver = g_object_ref (l->data);
break;
}