Monitor udev for hidraw devices instead of hid devices.
commitc8f29c25e718ca60f4ff4837d99a0f75ac8977de
authorreillyg@chromium.org <reillyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Jul 2014 17:53:01 +0000 (17 17:53 +0000)
committerreillyg@chromium.org <reillyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Jul 2014 17:53:01 +0000 (17 17:53 +0000)
tree1a6a080d0376b56df876afeb1f030c58d4e5128a
parente5bb75a821db601870d8d84dec485100bd46c940
Monitor udev for hidraw devices instead of hid devices.

Watching for new hid devices is racy because the hidraw device rules are
still running. Fix the race by explicitly waiting for the hidraw device
add event. The properties needed from the hid device can be gotten by
fetching the parent of the hidraw device from the sysfs tree.

BUG=394200

Review URL: https://codereview.chromium.org/396993010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283810 0039d316-1c4b-4281-b951-d872f2087c98
device/hid/hid_service_linux.cc
device/hid/hid_service_linux.h