From: Geert Uytterhoeven Date: Tue, 19 Oct 2021 14:45:10 +0000 (+0200) Subject: auxdisplay: ht16k33: Use HT16K33_FB_SIZE in ht16k33_initialize() X-Git-Tag: v5.16-rc1~98^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb61e137c004c160f772461ec39953d54f5c9aaf;p=thirdparty%2Flinux.git auxdisplay: ht16k33: Use HT16K33_FB_SIZE in ht16k33_initialize() Use the existing HT16K33_FB_SIZE definition instead of open-coding the same calculation using an hardcoded value. While at it, restore reverse Christmas tree variable declaration order. Signed-off-by: Geert Uytterhoeven Acked-by: Robin van der Gracht Signed-off-by: Miguel Ojeda --- diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index ed58083499907..fed2f8bd2d27c 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -168,9 +168,9 @@ requeue: static int ht16k33_initialize(struct ht16k33_priv *priv) { + uint8_t data[HT16K33_FB_SIZE]; uint8_t byte; int err; - uint8_t data[HT16K33_MATRIX_LED_MAX_COLS * 2]; /* Clear RAM (8 * 16 bits) */ memset(data, 0, sizeof(data));