Input: make input_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 10 Mar 2024 05:10:08 +0000 (21:10 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 10 Mar 2024 21:38:04 +0000 (14:38 -0700)
commita4735d40a5da96a637af6e5bf9f6ec8b9d996acd
tree4b504100ab7b6ce5b79578f90355aee0bf0a3bd0
parent1099a04ccc9b4d2b9d5dcd33d9bb9c333e147e8d
Input: make input_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the input_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240305-class_cleanup-input-v1-1-0c3d950c25db@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c
include/linux/input.h