]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Input: cros_ec_keyb - do not allocate keyboard state separately
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Feb 2026 21:30:19 +0000 (13:30 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Feb 2026 21:47:52 +0000 (13:47 -0800)
commitfd3c7a4522dc75b8828e03b26ae7a84fee9cb4a0
tree89e273043edf980d628787f880912efb32e01ec4
parent7d2657320c788318a5ddf670441aba83211c7a4d
Input: cros_ec_keyb - do not allocate keyboard state separately

Now that we know the upper bound for the number of columns, and know
that it is pretty small, there is no point in allocating it separately.
We are wasting more memory tracking the allocations.

Embed valid_keys and old_kb_state directly into cros_ec_keyb structure.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260222003717.471977-6-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/cros_ec_keyb.c