Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dded364b authored by Antonio Ospite's avatar Antonio Ospite Committed by Jiri Kosina
Browse files

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: default avatarAntonio Ospite <ospite@studenti.unina.it>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 34a5ceee
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);