aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/auxdisplay
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-03-08 17:11:19 +0200
committerMiguel Ojeda <ojeda@kernel.org>2022-03-18 20:31:14 +0100
commit13de23494f387315c6cfab6fe78fbed7d1b25586 (patch)
treeb3f68942c12a0df315587c6dddb3fb10a10f52e2 /drivers/auxdisplay
parentauxdisplay: lcd2s: Switch to i2c ->probe_new() (diff)
downloadlinux-dev-13de23494f387315c6cfab6fe78fbed7d1b25586.tar.xz
linux-dev-13de23494f387315c6cfab6fe78fbed7d1b25586.zip
auxdisplay: lcd2s: Use array size explicitly in lcd2s_gotoxy()
Currently the reading of the onstack array is confusing since two out of three members are of different types. Let it be more clear by explicitly set the array size, so everybody will understand that parameters are cast to the type of the array. While at it, add a missed space. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r--drivers/auxdisplay/lcd2s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index 91381d323566..e465108d9998 100644
--- a/drivers/auxdisplay/lcd2s.c
+++ b/drivers/auxdisplay/lcd2s.c
@@ -106,7 +106,7 @@ static int lcd2s_print(struct charlcd *lcd, int c)
static int lcd2s_gotoxy(struct charlcd *lcd, unsigned int x, unsigned int y)
{
struct lcd2s_data *lcd2s = lcd->drvdata;
- u8 buf[] = { LCD2S_CMD_CUR_POS, y + 1, x + 1};
+ u8 buf[3] = { LCD2S_CMD_CUR_POS, y + 1, x + 1 };
lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));