summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-04 19:32:13 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-02-06 18:08:46 +0300
commita0e35a173a86d93040d0e08f9c38526b6cf6c1d1 (patch)
treedb3cfc7bba38a39a7b3185406ff773fe79a665d2
parent6613476e225e090cc9aad49be7fa504e290dd33d (diff)
downloadlinux-a0e35a173a86d93040d0e08f9c38526b6cf6c1d1.tar.xz
hsi: hsi_core: make hsi_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the hsi_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240204-bus_cleanup-hsi-v1-1-f9318131e842@marliere.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r--drivers/hsi/hsi_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hsi/hsi_core.c b/drivers/hsi/hsi_core.c
index acbf82f755a8..e3beeac8aee5 100644
--- a/drivers/hsi/hsi_core.c
+++ b/drivers/hsi/hsi_core.c
@@ -48,7 +48,7 @@ static int hsi_bus_match(struct device *dev, struct device_driver *driver)
return false;
}
-static struct bus_type hsi_bus_type = {
+static const struct bus_type hsi_bus_type = {
.name = "hsi",
.dev_groups = hsi_bus_dev_groups,
.match = hsi_bus_match,