From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Petter Selasky <hselasky@c2i.net>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] Correctly set data for USB request in case of a previous failure.
Date: Tue, 5 Feb 2013 21:23:08 -0200 [thread overview]
Message-ID: <20130205212308.2158a854@redhat.com> (raw)
In-Reply-To: <201301141606.20156.hselasky@c2i.net>
Em Mon, 14 Jan 2013 16:06:20 +0100
Hans Petter Selasky <hselasky@c2i.net> escreveu:
> Improved patch follows:
It would be even more improved if you send it to the right ML ;)
I suspect that your original intention were to send it to
linux-input ML, instead of linux-media :)
Regards,
Mauro
>
> --HPS
>
> From a88d72d2108f92f004a3f050a708d9b7f661f924 Mon Sep 17 00:00:00 2001
> From: Hans Petter Selasky <hselasky@c2i.net>
> Date: Mon, 14 Jan 2013 13:53:21 +0100
> Subject: [PATCH] Correctly initialize data for USB request.
>
> Found-by: Jan Beich
> Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
> ---
> drivers/input/tablet/wacom.h | 1 +
> drivers/input/tablet/wacom_sys.c | 8 +++++---
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
> index b79d451..d6fad87 100644
> --- a/drivers/input/tablet/wacom.h
> +++ b/drivers/input/tablet/wacom.h
> @@ -89,6 +89,7 @@
> #include <linux/init.h>
> #include <linux/usb/input.h>
> #include <linux/power_supply.h>
> +#include <linux/string.h>
> #include <asm/unaligned.h>
>
> /*
> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
> index f92d34f..23bc71e 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -553,10 +553,12 @@ static int wacom_set_device_mode(struct usb_interface *intf, int report_id, int
> if (!rep_data)
> return error;
>
> - rep_data[0] = report_id;
> - rep_data[1] = mode;
> -
> do {
> + memset(rep_data, 0, length);
> +
> + rep_data[0] = report_id;
> + rep_data[1] = mode;
> +
> error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT,
> report_id, rep_data, length, 1);
> if (error >= 0)
--
Cheers,
Mauro
next prev parent reply other threads:[~2013-02-05 23:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 12:55 [PATCH] Correctly set data for USB request in case of a previous failure Hans Petter Selasky
2013-01-14 15:06 ` Hans Petter Selasky
2013-02-05 23:23 ` Mauro Carvalho Chehab [this message]
2013-02-06 7:13 ` Hans Petter Selasky
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=20130205212308.2158a854@redhat.com \
--to=mchehab@redhat.com \
--cc=hselasky@c2i.net \
--cc=linux-media@vger.kernel.org \
/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