]> git.baikalelectronics.ru Git - kernel.git/commit
Input: iforce - reformat the packet dump output
authorTim Schumacher <timschumi@gmx.de>
Tue, 24 Jul 2018 17:46:47 +0000 (10:46 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Jul 2018 00:04:46 +0000 (17:04 -0700)
commit4c46ae1fac0feefdedf1b30a0e5c26b764157285
tree7331583f35256a55149f4d1fc00829c5a7bda54b
parentc229a2de1da4e38dc25505bd96de15cf98c566a4
Input: iforce - reformat the packet dump output

Previously, packets that have been dumped are shown in the
kernel log like this:

drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff04, data =
56
02
04
00

Use dev_dbg to dump the packages only when requested and to list
the parent device as well. Use printf logic to generate the hexdump
instead of looping through every char that needs to be printed (which
in turn fixes the unnecessary newlines and looks more clean in general).

The resulting package dump output does now look like this:

usb 2-8: iforce_dump_packet info cmd = ff04, data = 56 02 04 00

Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/iforce/iforce-ff.c
drivers/input/joystick/iforce/iforce-main.c
drivers/input/joystick/iforce/iforce-packets.c
drivers/input/joystick/iforce/iforce.h