Skip to content

Commit 4ad9465

Browse files
rbmarlieremartinkpetersen
authored andcommitted
scsi: target: tcm_loop: Make tcm_loop_lld_bus const
Now that the driver core can properly handle constant struct bus_type, move the tcm_loop_lld_bus 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> Link: https://lore.kernel.org/r/20240204-bus_cleanup-target-v1-1-96106936c4ab@marliere.net Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent ac0dd0f commit 4ad9465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/target/loopback/tcm_loop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int tcm_loop_show_info(struct seq_file *m, struct Scsi_Host *host)
8383
static int tcm_loop_driver_probe(struct device *);
8484
static void tcm_loop_driver_remove(struct device *);
8585

86-
static struct bus_type tcm_loop_lld_bus = {
86+
static const struct bus_type tcm_loop_lld_bus = {
8787
.name = "tcm_loop_bus",
8888
.probe = tcm_loop_driver_probe,
8989
.remove = tcm_loop_driver_remove,

0 commit comments

Comments
 (0)