mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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>
This commit is contained in:
parent
d1278c91fe
commit
fbd5f5008f
@ -1007,7 +1007,7 @@ irqreturn_t serio_interrupt(struct serio *serio,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(serio_interrupt);
|
EXPORT_SYMBOL(serio_interrupt);
|
||||||
|
|
||||||
struct bus_type serio_bus = {
|
const struct bus_type serio_bus = {
|
||||||
.name = "serio",
|
.name = "serio",
|
||||||
.drv_groups = serio_driver_groups,
|
.drv_groups = serio_driver_groups,
|
||||||
.match = serio_bus_match,
|
.match = serio_bus_match,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <linux/mod_devicetable.h>
|
#include <linux/mod_devicetable.h>
|
||||||
#include <uapi/linux/serio.h>
|
#include <uapi/linux/serio.h>
|
||||||
|
|
||||||
extern struct bus_type serio_bus;
|
extern const struct bus_type serio_bus;
|
||||||
|
|
||||||
struct serio {
|
struct serio {
|
||||||
void *port_data;
|
void *port_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user