Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Antonio Ospite and committed by
Jiri Kosina
dded364b 34a5ceee

+2
+2
include/linux/hiddev.h
··· 193 193 * finfo.field_index = i; 194 194 * ioctl(fd, HIDIOCGFIELDINFO, &finfo); 195 195 * for (j = 0; j < finfo.maxusage; j++) { 196 + * uref.report_type = rinfo.report_type; 197 + * uref.report_id = rinfo.report_id; 196 198 * uref.field_index = i; 197 199 * uref.usage_index = j; 198 200 * ioctl(fd, HIDIOCGUCODE, &uref);