]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: hidp: remove wrong send_report at init
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 11 Jul 2013 13:41:30 +0000 (15:41 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 12 Jul 2013 10:08:09 +0000 (11:08 +0100)
The USB hid implementation does retrieve the reports during the start.
However, this implementation does not call the HID command GET_REPORT
(which would fetch the current status of each report), but use the
DATA command, which is an Output Report (so transmitting data from the
host to the device).
The Wiimote controller is already guarded against this problem in the
protocol, but it is not conformant to the specification to set all the
reports to 0 on start.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hidp/core.c

index 9c8b50db3d45ce14b82097f8a06cbb66c36550b9..59d132a131b201c6b817d4159836cea7d5269b5c 100644 (file)
@@ -703,20 +703,6 @@ static int hidp_parse(struct hid_device *hid)
 
 static int hidp_start(struct hid_device *hid)
 {
-       struct hidp_session *session = hid->driver_data;
-       struct hid_report *report;
-
-       if (hid->quirks & HID_QUIRK_NO_INIT_REPORTS)
-               return 0;
-
-       list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].
-                       report_list, list)
-               hidp_send_report(session, report);
-
-       list_for_each_entry(report, &hid->report_enum[HID_FEATURE_REPORT].
-                       report_list, list)
-               hidp_send_report(session, report);
-
        return 0;
 }