HID: hiddev.h: Fix example code.
authorAntonio Ospite <ospite@studenti.unina.it>
Thu, 2 Oct 2008 20:15:02 +0000 (22:15 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 14 Oct 2008 21:51:02 +0000 (23:51 +0200)
Fix hiddev.h example code.
To get the correct usage code, you need to set report_type and
report_id.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
include/linux/hiddev.h

index 7a9ba2944127e132d688eecd23a16ff0797cf12f..c760ae0eb6a12b8842297388d2d86ec14f20291c 100644 (file)
@@ -193,6 +193,8 @@ struct hiddev_usage_ref_multi {
  *             finfo.field_index = i;
  *             ioctl(fd, HIDIOCGFIELDINFO, &finfo);
  *             for (j = 0; j < finfo.maxusage; j++) {
+ *                     uref.report_type = rinfo.report_type;
+ *                     uref.report_id = rinfo.report_id;
  *                     uref.field_index = i;
  *                     uref.usage_index = j;
  *                     ioctl(fd, HIDIOCGUCODE, &uref);