Commit 362e54e4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

staging: fbtft: Consider type of init sequence values in fbtft_init_display()

In the fbtft_init_display() the init sequence is printed for
the debug purposes. Unfortunately the current code doesn't take
into account that values in the buffer are of the s16 type.

Consider that and replace the printing code with fbtft_par_dbg_hex()
call.

Fixes: b8888970 ("staging/fbtft: Remove all strcpy() uses")
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220316165351.58107-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0e8cf2be
......@@ -1034,10 +1034,9 @@ int fbtft_init_display(struct fbtft_par *par)
for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
;
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
"init: write(0x%02X) %*ph\n",
par->init_sequence[i], j,
&par->init_sequence[i + 1]);
fbtft_par_dbg_hex(DEBUG_INIT_DISPLAY, par, par->info->device,
s16, &par->init_sequence[i + 1], j,
"init: write(0x%02X)", par->init_sequence[i]);
/* Write */
j = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment