diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-19 08:45:53 -0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-02-26 21:22:26 -0500 |
commit | 517bcc2b4db435f230fe864f3db0a0f21d2f6951 (patch) | |
tree | 86a5ad86d3a674d122069d8fda1c28962ce062b1 /drivers/scsi/hosts.c | |
parent | 3e24118ec1859afe2df18062e1ebdabc12e3b8c1 (diff) |
scsi: core: Constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
scsi_host_type, scsi_target_type and scsi_dev_type variables to be constant
structures as well, placing it into read-only memory which can not be
modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240219-device_cleanup-scsi-v1-1-c5edf2afe178@marliere.net
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index d7f51b84f3c7..4f495a41ec4a 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -371,7 +371,7 @@ static void scsi_host_dev_release(struct device *dev) kfree(shost); } -static struct device_type scsi_host_type = { +static const struct device_type scsi_host_type = { .name = "scsi_host", .release = scsi_host_dev_release, }; |