Skip to content

Commit a0e35a1

Browse files
rbmarlieresre
authored andcommitted
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>
1 parent 6613476 commit a0e35a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hsi/hsi_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int hsi_bus_match(struct device *dev, struct device_driver *driver)
4848
return false;
4949
}
5050

51-
static struct bus_type hsi_bus_type = {
51+
static const struct bus_type hsi_bus_type = {
5252
.name = "hsi",
5353
.dev_groups = hsi_bus_dev_groups,
5454
.match = hsi_bus_match,

0 commit comments

Comments
 (0)