]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: Fix debug output of ark3116
authorJan Engelhardt <jengelh@linux01.gwdg.de>
Thu, 17 May 2007 15:16:44 +0000 (17:16 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 May 2007 06:45:50 +0000 (23:45 -0700)
Fix debug output. Previously, it would output "0xFFFFFFB0" on 32-bit
archs (and probably "0xFFFFFFFFFFFFFFB0" on 64-bits), because buf is
taken as signed char, which is promoted to signed int, while %x always
expects an unsigned int.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/ark3116.c

index ea2175bb227460079cda3c8ca994ca35a6dccdb6..fe437125f14bc9f86cdb2b4352c04c2c2528aca6 100644 (file)
@@ -63,7 +63,8 @@ static inline void ARK3116_RCV(struct usb_serial *serial, int seq,
                                 request, requesttype, value, index,
                                 buf, 0x0000001, 1000);
        if (result)
-               dbg("%03d < %d bytes [0x%02X]", seq, result, buf[0]);
+               dbg("%03d < %d bytes [0x%02X]", seq, result,
+                   ((unsigned char *)buf)[0]);
        else
                dbg("%03d < 0 bytes", seq);
 }