Correctly set data for USB request in case of a previous failure.
Subsystems (2)
PATCH 1/1 Correctly set data for USB request in case of a previous failure.
Quoted 1 line
From
89326793e2429dc55d951f336b3e3e3b73bedb95Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <[email protected]>
Date: Mon, 14 Jan 2013 13:53:21 +0100
Subject: [PATCH] Correctly set data for USB request in case of a previous
failure.
--- drivers/input/tablet/wacom_sys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/tablet/wacom_sys.c +3 -3
@@ -553,10 +553,10 @@ static int wacom_set_device_mode(struct usb_interface *intf, int report_id, intif (!rep_data)return error; - rep_data[0 ] = report_id; - rep_data[1 ] = mode; - do { + 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)
Signature · 1 line
1.7.11.4
Improved patch follows:
--HPS
Quoted 1 line
From
a88d72d2108f92f004a3f050a708d9b7f661f924Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <[email protected]>
Date: Mon, 14 Jan 2013 13:53:21 +0100
Subject: [PATCH] Correctly initialize data for USB request.
--- drivers/input/tablet/wacom.h | 1 + drivers/input/tablet/wacom_sys.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/input/tablet/wacom.h +1 -0
@@ -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> /*
drivers/input/tablet/wacom_sys.c +5 -3
@@ -553,10 +553,12 @@ static int wacom_set_device_mode(struct usb_interface *intf, int report_id, intif (!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)
Signature · 1 line
1.7.11.4
Em Mon, 14 Jan 2013 16:06:20 +0100
Hans Petter Selasky <[email protected]> escreveu:
Quoted 1 line
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
Quoted 47 lines
--HPS
From
a88d72d2108f92f004a3f050a708d9b7f661f924Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <[email protected]>
Date: Mon, 14 Jan 2013 13:53:21 +0100
Subject: [PATCH] Correctly initialize data for USB request.Found-by Jan BeichSigned-off-by Hans Petter Selasky <[email protected]>--- drivers/input/tablet/wacom.h | 1 + drivers/input/tablet/wacom_sys.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)drivers/input/tablet/wacom.h +1
-0@@ -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> /* drivers/input/tablet/wacom_sys.c +5
-3@@ -553,10 +553,12 @@ static int wacom_set_device_mode(struct usb_interface *intf, int report_id, intif (!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)
Signature · 2 lines
Cheers, Mauro
Quoted 8 lines · On Wednesday 06 February 2013 00:23:08 Mauro Carvalho Chehab wrote:
Em Mon, 14 Jan 2013 16:06:20 +0100
Hans Petter Selasky <[email protected]> escreveu:
Quoted 1 line
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 :)
Ok, will do. Thanks!
--HPS