summaryrefslogtreecommitdiff
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2023-03-22 12:55:15 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-24 19:20:00 -0400
commit04d1fa4346ccedde68886a4d5a0003f3a322467b (patch)
tree97003c317ea4d72afb25186c40733ec2f8762014 /drivers/usb/storage
parentf2e2fe3dec7f44fea4c0cd66ca5abf5cd080407c (diff)
scsi: usb: uas: Declare two host templates and host template pointers const
Improve source code documentation by constifying host templates that are not modified. Acked-by: Alan Stern <stern@rowland.harvard.edu> (for usb-storage) Acked-by: Oliver Neukum <oneukum@suse.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Oliver Neukum <oneukum@suse.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230322195515.1267197-81-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/uas.c2
-rw-r--r--drivers/usb/storage/usb.c2
-rw-r--r--drivers/usb/storage/usb.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index de3836412bf3..2583ee9815c5 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -894,7 +894,7 @@ static int uas_slave_configure(struct scsi_device *sdev)
return 0;
}
-static struct scsi_host_template uas_host_template = {
+static const struct scsi_host_template uas_host_template = {
.module = THIS_MODULE,
.name = "uas",
.queuecommand = uas_queuecommand,
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index ed7c6ad96a74..7b36a3334fb3 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -937,7 +937,7 @@ int usb_stor_probe1(struct us_data **pus,
struct usb_interface *intf,
const struct usb_device_id *id,
const struct us_unusual_dev *unusual_dev,
- struct scsi_host_template *sht)
+ const struct scsi_host_template *sht)
{
struct Scsi_Host *host;
struct us_data *us;
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
index 0451fac1adce..fd3f32670873 100644
--- a/drivers/usb/storage/usb.h
+++ b/drivers/usb/storage/usb.h
@@ -187,7 +187,7 @@ extern int usb_stor_probe1(struct us_data **pus,
struct usb_interface *intf,
const struct usb_device_id *id,
const struct us_unusual_dev *unusual_dev,
- struct scsi_host_template *sht);
+ const struct scsi_host_template *sht);
extern int usb_stor_probe2(struct us_data *us);
extern void usb_stor_disconnect(struct usb_interface *intf);