summaryrefslogtreecommitdiff
path: root/src/accelerometer/accelerometer.c
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2013-03-17 12:50:36 -0400
committerRichard Yao <ryao@cs.stonybrook.edu>2013-03-17 12:50:36 -0400
commit788245436d3c9e3fbc84285d60f3b4c40e18c207 (patch)
tree2983d000a6b91e6c6f0877fadc14b47df5e0adee /src/accelerometer/accelerometer.c
parent15cad0e19bc6e79fe70b23b1b0f076ab23d4d7a4 (diff)
parent261132097e647d259c851b32c3c5798fa13cc67a (diff)
Merge remote-tracking branch 'origin/follow-upstream'
Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'src/accelerometer/accelerometer.c')
-rw-r--r--src/accelerometer/accelerometer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/accelerometer/accelerometer.c b/src/accelerometer/accelerometer.c
index 67fed27c5e..76c64d753b 100644
--- a/src/accelerometer/accelerometer.c
+++ b/src/accelerometer/accelerometer.c
@@ -257,7 +257,6 @@ int main (int argc, char** argv)
char devpath[PATH_MAX];
char *devnode;
- const char *id_path;
struct udev_enumerate *enumerate;
struct udev_list_entry *list_entry;
@@ -303,18 +302,10 @@ int main (int argc, char** argv)
return 1;
}
- id_path = udev_device_get_property_value(dev, "ID_PATH");
- if (id_path == NULL) {
- fprintf (stderr, "unable to get property ID_PATH for '%s'", devpath);
- return 0;
- }
-
/* Get the children devices and find the devnode */
- /* FIXME: use udev_enumerate_add_match_parent() instead */
devnode = NULL;
enumerate = udev_enumerate_new(udev);
- udev_enumerate_add_match_property(enumerate, "ID_PATH", id_path);
- udev_enumerate_add_match_subsystem(enumerate, "input");
+ udev_enumerate_add_match_parent(enumerate, dev);
udev_enumerate_scan_devices(enumerate);
udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) {
struct udev_device *device;