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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux