summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-03 20:14:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-06 15:35:38 +0100
commit88cddfb7bf23b06876da6c3e9f296e666d0f6332 (patch)
treefb7081c66dfddb5e80676cf94ae3e4bd4debc4da /drivers
parenttty: serial: samsung: Remove superfluous braces in macro (diff)
downloadlinux-88cddfb7bf23b06876da6c3e9f296e666d0f6332.tar.xz
linux-88cddfb7bf23b06876da6c3e9f296e666d0f6332.zip
serdev: make serdev_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the serdev_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 <gregkh@linuxfoundation.org> Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net> Link: https://lore.kernel.org/r/20240203-bus_cleanup-tty-v1-1-86b698c82efe@marliere.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serdev/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 822a5cd05566..613cb356b918 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -431,7 +431,7 @@ static void serdev_drv_remove(struct device *dev)
dev_pm_domain_detach(dev, true);
}
-static struct bus_type serdev_bus_type = {
+static const struct bus_type serdev_bus_type = {
.name = "serial",
.match = serdev_device_match,
.probe = serdev_drv_probe,