提交 34a5ceee 编写于 作者: A Antonio Ospite 提交者: Jiri Kosina

HID: hiddev.h: Fix mixed space and tabs in example code.

Fix mixed space and tabs in example code.
Signed-off-by: NAntonio Ospite <ospite@studenti.unina.it>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 79575019
...@@ -182,26 +182,26 @@ struct hiddev_usage_ref_multi { ...@@ -182,26 +182,26 @@ struct hiddev_usage_ref_multi {
/* To traverse the input report descriptor info for a HID device, perform the /* To traverse the input report descriptor info for a HID device, perform the
* following: * following:
* *
* rinfo.report_type = HID_REPORT_TYPE_INPUT; * rinfo.report_type = HID_REPORT_TYPE_INPUT;
* rinfo.report_id = HID_REPORT_ID_FIRST; * rinfo.report_id = HID_REPORT_ID_FIRST;
* ret = ioctl(fd, HIDIOCGREPORTINFO, &rinfo); * ret = ioctl(fd, HIDIOCGREPORTINFO, &rinfo);
* *
* while (ret >= 0) { * while (ret >= 0) {
* for (i = 0; i < rinfo.num_fields; i++) { * for (i = 0; i < rinfo.num_fields; i++) {
* finfo.report_type = rinfo.report_type; * finfo.report_type = rinfo.report_type;
* finfo.report_id = rinfo.report_id; * finfo.report_id = rinfo.report_id;
* finfo.field_index = i; * finfo.field_index = i;
* ioctl(fd, HIDIOCGFIELDINFO, &finfo); * ioctl(fd, HIDIOCGFIELDINFO, &finfo);
* for (j = 0; j < finfo.maxusage; j++) { * for (j = 0; j < finfo.maxusage; j++) {
* uref.field_index = i; * uref.field_index = i;
* uref.usage_index = j; * uref.usage_index = j;
* ioctl(fd, HIDIOCGUCODE, &uref); * ioctl(fd, HIDIOCGUCODE, &uref);
* ioctl(fd, HIDIOCGUSAGE, &uref); * ioctl(fd, HIDIOCGUSAGE, &uref);
* } * }
* } * }
* rinfo.report_id |= HID_REPORT_ID_NEXT; * rinfo.report_id |= HID_REPORT_ID_NEXT;
* ret = ioctl(fd, HIDIOCGREPORTINFO, &rinfo); * ret = ioctl(fd, HIDIOCGREPORTINFO, &rinfo);
* } * }
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册