OSDN Git Service

staging: comedi: jr3_pci: re-work firmware copyright display
authorIan Abbott <abbotti@mev.co.uk>
Fri, 17 Feb 2017 11:09:12 +0000 (11:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:16:58 +0000 (09:16 +0100)
commit048ad49af32fe910259bc5f1a49f464b63a03029
treeae1f1ab5c7d83abae6604394ec6552cfedc1c7d0
parent47ba9b528501273712b8e14bc1cb4c772fcfe9f2
staging: comedi: jr3_pci: re-work firmware copyright display

If debug messages are enabled, the card initialization done in
`jr3_pci_auto_attach()` spits out 24 (0x18) debug messages to show the
null-terminated copyright string embedded in the firmware, one character
at a time, including the ASCII NUL characters at the end.  Factor out
the copyright display into a new function `jr3_pci_show_copyright()` and
re-work it to copy the whole copyright string into a buffer, so that it
can be shown with a single debug message.

Incidentally, this also removes a checkpatch warning "Avoid multiple
line dereference" in the original code.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/jr3_pci.c