aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/joystick/iforce/iforce-ff.c
diff options
context:
space:
mode:
authorGravatar Tim Schumacher <timschumi@gmx.de> 2018-07-24 10:46:47 -0700
committerGravatar Dmitry Torokhov <dmitry.torokhov@gmail.com> 2018-07-26 17:04:46 -0700
commit305180bc05019b60ff7aea0b1d68ddbac205ca1f (patch)
tree7331583f35256a55149f4d1fc00829c5a7bda54b /drivers/input/joystick/iforce/iforce-ff.c
parentInput: stop telling users to snail-mail Vojtech (diff)
downloadlinux-305180bc05019b60ff7aea0b1d68ddbac205ca1f.tar.gz
linux-305180bc05019b60ff7aea0b1d68ddbac205ca1f.tar.bz2
linux-305180bc05019b60ff7aea0b1d68ddbac205ca1f.zip
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>
Diffstat (limited to 'drivers/input/joystick/iforce/iforce-ff.c')
-rw-r--r--drivers/input/joystick/iforce/iforce-ff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/joystick/iforce/iforce-ff.c b/drivers/input/joystick/iforce/iforce-ff.c
index 2ed923874bbc..3536d5f5ad18 100644
--- a/drivers/input/joystick/iforce/iforce-ff.c
+++ b/drivers/input/joystick/iforce/iforce-ff.c
@@ -52,7 +52,7 @@ static int make_magnitude_modifier(struct iforce* iforce,
iforce_send_packet(iforce, FF_CMD_MAGNITUDE, data);
- iforce_dump_packet("magnitude: ", FF_CMD_MAGNITUDE, data);
+ iforce_dump_packet(iforce, "magnitude", FF_CMD_MAGNITUDE, data);
return 0;
}
@@ -174,7 +174,7 @@ static int make_condition_modifier(struct iforce* iforce,
data[9] = (100 * lsat) >> 16;
iforce_send_packet(iforce, FF_CMD_CONDITION, data);
- iforce_dump_packet("condition", FF_CMD_CONDITION, data);
+ iforce_dump_packet(iforce, "condition", FF_CMD_CONDITION, data);
return 0;
}