Skip to contentSkip to conversation

HID: hid-sensor-hub: do not process feature reports in raw_even

PATCH Srinivas Pandruvada 1 participant 1 message May 29, 2013 HID

lore
Share & tools
lore
#0 lore raw

Hi Jiri,

Daniel has tested and confirmed that this patch fixes issue.

Thanks,
Srinivas

-------- Original Message --------

Subject:     Re: Fwd: Re: [PATCH] HID: hid-sensor-hub: do not process feature reports in raw_event
Date:     Wed, 29 May 2013 12:49:42 -0700
From:     Daniel Leung <[email protected]>
To:     Srinivas Pandruvada <[email protected]>

With this patch, the sensor hub works on the Acer Iconia W700. The accelerometer and gyroscope are both powered on and are sending readings.

Daniel

Quoted 53 lines · On Wed, 29 May 2013 07:55:44 -0700 Srinivas Pandruvada…

Hi Daniel,

Can you test this? I will test on the hub I have also.

Thanks,
Srinivas

-------- Original Message --------
Subject: Re: [PATCH] HID: hid-sensor-hub: do not process feature
reports in raw_event

Date:     Wed, 29 May 2013 16:19:49 +0200 (CEST)
From:     Jiri Kosina <[email protected]>
To:     Srinivas Pandruvada <[email protected]>

CC: Daniel Leung <[email protected]>,
[email protected], [email protected], [email protected]

Quoted 2 lines · Srinivas Pandruvada

I don't know if this should be fixed in client drivers since other drivers may have this issue.

Agreed.

Srinivas, how about the patch below, could you please test it in your scenario to see whether it actually fixes the issue?

Thanks.

drivers/hid/hid-core.c +1 -2
index 264f550..65879b9 100644
@@ -1293,7 +1293,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 
      if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
          ret = hdrv->raw_event(hid, report, data, size);
-        if (ret != 0) {
+        if (ret < 0) {
              ret = ret < 0 ? ret : 0;
              goto unlock;
          }
--

Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html