• Tim Schumacher's avatar
    Input: iforce - reformat the packet dump output · 305180bc
    Tim Schumacher authored
    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: default avatarTim Schumacher <timschumi@gmx.de>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    305180bc
iforce.h 4.91 KB