The sizeof operator will return the size of the pointer, not
the size of the buffer it points to. The upstream LED commit
(5d7e7d47) already does this. Required for Intuos5 LEDs to
work properly.

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
 2.6.30/wacom_sys.c |    2 +-
 2.6.36/wacom_sys.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/2.6.30/wacom_sys.c b/2.6.30/wacom_sys.c
index bc43225..8cf9540 100755
--- a/2.6.30/wacom_sys.c
+++ b/2.6.30/wacom_sys.c
@@ -508,7 +508,7 @@ static int wacom_led_control(struct wacom *wacom)
        buf[3] = wacom->led.hlv;
 
        retval = wacom_set_report(wacom->intf, 0x03, WAC_CMD_LED_CONTROL,
-                                 buf, sizeof(buf), WAC_CMD_RETRIES);
+                                 buf, 9, WAC_CMD_RETRIES);
        kfree(buf);
 
        return retval;
diff --git a/2.6.36/wacom_sys.c b/2.6.36/wacom_sys.c
index 11e4af9..479cbd1 100644
--- a/2.6.36/wacom_sys.c
+++ b/2.6.36/wacom_sys.c
@@ -509,7 +509,7 @@ static int wacom_led_control(struct wacom *wacom)
        buf[4] = wacom->led.img_lum;
 
        retval = wacom_set_report(wacom->intf, 0x03, WAC_CMD_LED_CONTROL,
-                                 buf, sizeof(buf), WAC_CMD_RETRIES);
+                                 buf, 9, WAC_CMD_RETRIES);
        kfree(buf);
 
        return retval;
-- 
1.7.9.5


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to