From: Antonio Ospite Date: Thu, 2 Oct 2008 20:15:02 +0000 (+0200) Subject: HID: hiddev.h: Fix example code. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=dded364bf4e1f0de67d7d7b9e77c06b23a9f081f;p=openwrt%2Fstaging%2Fblogic.git HID: hiddev.h: Fix example code. 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 Signed-off-by: Jiri Kosina --- diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index 7a9ba2944127..c760ae0eb6a1 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h @@ -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);