Re: [PATCHv3 1/1] HID: add BETOP game controller force feedback support

From: Jiri Kosina
Date: Thu Nov 27 2014 - 04:05:15 EST


On Thu, 27 Nov 2014, Huang Bo wrote:

> From: Huang Bo <huangbobupt@xxxxxxx>
>
> Adds force feedback support for BETOP USB game controllers.
> These devices are mass produced in China.

Thanks. We are almost there, except ...

[ ... snip ... ]
> +static int betopff_init(struct hid_device *hid)
> +{
> + struct betopff_device *betopff;
> + struct hid_report *report;
> + struct hid_input *hidinput =
> + list_first_entry(&hid->inputs, struct hid_input, list);
> + struct list_head *report_list =
> + &hid->report_enum[HID_OUTPUT_REPORT].report_list;
> + struct input_dev *dev = hidinput->input;
> + int field_count = 0;
> + int error;
> + int i, j;
> +
> + if (list_empty(report_list)) {
> + hid_err(hid, "no output reports found\n");
> + return -ENODEV;
> + }
> +
> + report = list_first_entry(report_list, struct hid_report, list);
> + for (i = 0; i < report->maxfield; i++) {
> + for (j = 0; j < report->field[i]->report_count; j++) {
> + report->field[i]->value[j] = 0x00;

I asked for a comment to be added here why you are zeroing those out.

Thanks,

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/