From: Antonio Ospite Date: Thu, 2 Oct 2008 20:15:02 +0000 (+0200) Subject: HID: hiddev.h: Fix example code. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dded364bf4e1f0de67d7d7b9e77c06b23a9f081f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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);