diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-03-09 21:10:08 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-03-10 14:38:04 -0700 |
commit | a4735d40a5da96a637af6e5bf9f6ec8b9d996acd (patch) | |
tree | 4b504100ab7b6ce5b79578f90355aee0bf0a3bd0 /include | |
parent | 1099a04ccc9b4d2b9d5dcd33d9bb9c333e147e8d (diff) | |
download | linux-stable-a4735d40a5da96a637af6e5bf9f6ec8b9d996acd.tar.gz linux-stable-a4735d40a5da96a637af6e5bf9f6ec8b9d996acd.tar.bz2 linux-stable-a4735d40a5da96a637af6e5bf9f6ec8b9d996acd.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/input.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index de6503c0edb8..c22ac465254b 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -514,7 +514,7 @@ void input_enable_softrepeat(struct input_dev *dev, int delay, int period); bool input_device_enabled(struct input_dev *dev); -extern struct class input_class; +extern const struct class input_class; /** * struct ff_device - force-feedback part of an input device |