OSDN Git Service

HID: hid-sensor-hub: do not process feature reports in raw_event
authorDaniel Leung <daniel.leung@intel.com>
Fri, 4 Jan 2013 17:38:23 +0000 (09:38 -0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 13 Dec 2014 17:06:41 +0000 (01:06 +0800)
In sensor_hub_raw_event(), feature reports are ignored but are still
marked as processed. This causes the in-kernel struct not to be
updated. Any non-updated fields in the feature reports are zero, and
they are being sent to the device. This causes confusion in the sensor
hub firmware, and some sensors are not powered up as a result.

This changes the raw_event rountine to only process input reports,
and let the hid core handle the incoming feature reports.

For: AXIA-1451
Change-Id: I0f246afd1d773aa9c07a4333ccf2e7f2a2c35278
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
drivers/hid/hid-sensor-hub.c

index e6d8e18..6997953 100644 (file)
@@ -438,7 +438,7 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
                         report->id, size, report->type);
        hid_dbg(hdev, "maxfield:%d\n", report->maxfield);
        if (report->type != HID_INPUT_REPORT)
-               return 1;
+               return 0;
 
        ptr = raw_data;
        ptr++; /* Skip report id */