diff options
author | Ricardo B. Marliere <[email protected]> | 2024-02-03 16:14:51 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-02-06 14:35:42 +0000 |
commit | f60ce0e4bbf385a938e89b6dcead1eea89b83741 (patch) | |
tree | 309b8ad28de493dd8746f7bcd5641fcc8a598966 | |
parent | 88cddfb7bf23b06876da6c3e9f296e666d0f6332 (diff) |
serial: core: make serial_base_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the serial_base_bus_type 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 <[email protected]>
Signed-off-by: "Ricardo B. Marliere" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/tty/serial/serial_base_bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c index 3dfcf20c4eb6..4df2a4b10445 100644 --- a/drivers/tty/serial/serial_base_bus.c +++ b/drivers/tty/serial/serial_base_bus.c @@ -41,7 +41,7 @@ static int serial_base_match(struct device *dev, struct device_driver *drv) return 0; } -static struct bus_type serial_base_bus_type = { +static const struct bus_type serial_base_bus_type = { .name = "serial-base", .match = serial_base_match, }; |