linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Pablo Ceballos <pceballos@google.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: hid-sensor-hub: Fix issue with devices with no report ID
Date: Thu, 5 Nov 2020 11:09:56 +0100 (CET)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2011051109490.18859@cbobk.fhfr.pm> (raw)
In-Reply-To: <20201103002939.688690-1-pceballos@google.com>

On Mon, 2 Nov 2020, Pablo Ceballos wrote:

> 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: Pablo Ceballos <pceballos@google.com>
> ---
>  drivers/hid/hid-sensor-hub.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
> index 94c7398b5c27..3dd7d3246737 100644
> --- a/drivers/hid/hid-sensor-hub.c
> +++ b/drivers/hid/hid-sensor-hub.c
> @@ -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 */
>  

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs


      parent reply	other threads:[~2020-11-05 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  0:29 [PATCH] HID: hid-sensor-hub: Fix issue with devices with no report ID Pablo Ceballos
2020-11-05  3:24 ` Srinivas Pandruvada
2020-11-05 10:09 ` Jiri Kosina [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.2011051109490.18859@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pceballos@google.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).