Skip to content

Commit 362e54e

Browse files
andy-shevgregkh
authored andcommitted
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: b888897 ("staging/fbtft: Remove all strcpy() uses") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220316165351.58107-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0e8cf2b commit 362e54e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/staging/fbtft/fbtft-core.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,10 +1034,9 @@ int fbtft_init_display(struct fbtft_par *par)
10341034
for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
10351035
;
10361036

1037-
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
1038-
"init: write(0x%02X) %*ph\n",
1039-
par->init_sequence[i], j,
1040-
&par->init_sequence[i + 1]);
1037+
fbtft_par_dbg_hex(DEBUG_INIT_DISPLAY, par, par->info->device,
1038+
s16, &par->init_sequence[i + 1], j,
1039+
"init: write(0x%02X)", par->init_sequence[i]);
10411040

10421041
/* Write */
10431042
j = 0;

0 commit comments

Comments
 (0)