Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: serio - make serio_bus const

Now that the driver core can properly handle constant struct bus_type,
move the serio_bus variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240210-bus_cleanup-input2-v1-2-0daef7e034e0@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Ricardo B. Marliere and committed by
Dmitry Torokhov
fbd5f500 d1278c91

+2 -2
+1 -1
drivers/input/serio/serio.c
··· 1007 1007 } 1008 1008 EXPORT_SYMBOL(serio_interrupt); 1009 1009 1010 - struct bus_type serio_bus = { 1010 + const struct bus_type serio_bus = { 1011 1011 .name = "serio", 1012 1012 .drv_groups = serio_driver_groups, 1013 1013 .match = serio_bus_match,
+1 -1
include/linux/serio.h
··· 15 15 #include <linux/mod_devicetable.h> 16 16 #include <uapi/linux/serio.h> 17 17 18 - extern struct bus_type serio_bus; 18 + extern const struct bus_type serio_bus; 19 19 20 20 struct serio { 21 21 void *port_data;