summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2016-06-19 15:46:02 +0200
committerJiri Kosina <jkosina@suse.cz>2016-06-20 11:26:27 +0200
commitddfe8483e9a938ed82b411e1f47c3249f0567658 (patch)
tree76482c5ae0ea83fb690e585b760d78f7f85f7009 /drivers/hid
parent6be28d33874998e1523df818173dacfed180b792 (diff)
downloadlinux-stable-ddfe8483e9a938ed82b411e1f47c3249f0567658.tar.gz
linux-stable-ddfe8483e9a938ed82b411e1f47c3249f0567658.tar.bz2
linux-stable-ddfe8483e9a938ed82b411e1f47c3249f0567658.zip
HID: thingm: simplify debug output code
Kernel printf format %*ph allows to print small buffers up to 64 bytes. Make use of it to simplify the debug output code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-thingm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/hid/hid-thingm.c b/drivers/hid/hid-thingm.c
index 9ad9c6ec5bba..9b4fec4ed149 100644
--- a/drivers/hid/hid-thingm.c
+++ b/drivers/hid/hid-thingm.c
@@ -73,9 +73,7 @@ static int thingm_send(struct thingm_device *tdev, u8 buf[REPORT_SIZE])
{
int ret;
- hid_dbg(tdev->hdev, "-> %d %c %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n",
- buf[0], buf[1], buf[2], buf[3], buf[4],
- buf[5], buf[6], buf[7], buf[8]);
+ hid_dbg(tdev->hdev, "-> %d %c %7ph\n", buf[0], buf[1], &buf[2]);
mutex_lock(&tdev->lock);
@@ -110,9 +108,7 @@ static int thingm_recv(struct thingm_device *tdev, u8 buf[REPORT_SIZE])
ret = 0;
- hid_dbg(tdev->hdev, "<- %d %c %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n",
- buf[0], buf[1], buf[2], buf[3], buf[4],
- buf[5], buf[6], buf[7], buf[8]);
+ hid_dbg(tdev->hdev, "<- %d %c %7ph\n", buf[0], buf[1], &buf[2]);
err:
mutex_unlock(&tdev->lock);
return ret;