auxdisplay: lcd2s: Fix lcd2s_redefine_char() feature
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Feb 2022 15:47:16 +0000 (17:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:47 +0000 (19:12 +0100)
commitf9c3aa939c418b3a434972a7887e509ab1c87f3c
treec913f17eb88defb0beb0bdb460e08a274fd48af3
parent4efa386ef9e11479aa4faae937213cbba53c28a3
auxdisplay: lcd2s: Fix lcd2s_redefine_char() feature

commit 4424c35ead667ba2e8de7ab8206da66453e6f728 upstream.

It seems that the lcd2s_redefine_char() has never been properly
tested. The buffer is filled by DEF_CUSTOM_CHAR command followed
by the character number (from 0 to 7), but immediately after that
these bytes are rewritten by the decoded hex stream.

Fix the index to fill the buffer after the command and number.

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
[fixed typo in commit message]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/auxdisplay/lcd2s.c