Commit 34a9fa20 authored by Pablo Ceballos's avatar Pablo Ceballos Committed by Jiri Kosina

HID: hid-sensor-hub: Fix issue with devices with no report ID

Some HID devices don't use a report ID because they only have a single
report. In those cases, the report ID in struct hid_report will be zero
and the data for the report will start at the first byte, so don't skip
over the first byte.
Signed-off-by: default avatarPablo Ceballos <pceballos@google.com>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 5c7e02a8
......@@ -483,7 +483,8 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
return 1;
ptr = raw_data;
ptr++; /* Skip report id */
if (report->id)
ptr++; /* Skip report id */
spin_lock_irqsave(&pdata->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment