Commit fb61e137 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Miguel Ojeda

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarRobin van der Gracht <robin@protonic.nl>
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 840fe258
...@@ -168,9 +168,9 @@ static void ht16k33_fb_update(struct work_struct *work) ...@@ -168,9 +168,9 @@ static void ht16k33_fb_update(struct work_struct *work)
static int ht16k33_initialize(struct ht16k33_priv *priv) static int ht16k33_initialize(struct ht16k33_priv *priv)
{ {
uint8_t data[HT16K33_FB_SIZE];
uint8_t byte; uint8_t byte;
int err; int err;
uint8_t data[HT16K33_MATRIX_LED_MAX_COLS * 2];
/* Clear RAM (8 * 16 bits) */ /* Clear RAM (8 * 16 bits) */
memset(data, 0, sizeof(data)); memset(data, 0, sizeof(data));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment