]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: preallocate memory to hold event values
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 3 Jul 2024 21:37:53 +0000 (14:37 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 8 Jul 2024 23:22:49 +0000 (16:22 -0700)
commit0cd58773520584ccb4ce1eeebd8d43f1b27bb24a
treefabfaef026dbca5483045860fb65d1055d60cd9b
parent3544cf574a577d92111f0b29e6d649b7ea3210ed
Input: preallocate memory to hold event values

Preallocate memory for holding event values (input_dev->vals) so that
there is no need to check if it was allocated or not in the event
processing code.

The amount of memory will be adjusted after input device has been fully
set up upon registering device with the input core.

Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Link: https://lore.kernel.org/r/20240703213756.3375978-7-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c