]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
auxdisplay: ht16k33: Use HT16K33_FB_SIZE in ht16k33_initialize()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 19 Oct 2021 14:45:10 +0000 (16:45 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 21 Oct 2021 21:36:29 +0000 (23:36 +0200)
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 <geert@linux-m68k.org>
Acked-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
drivers/auxdisplay/ht16k33.c

index ed5808349990782ce3a6685baf5118bc2d5f7e89..fed2f8bd2d27c65ba4e533919712cdf0403ca65e 100644 (file)
@@ -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));