Commit 25df73d9 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: ata: Declare SCSI host templates const



Make it explicit that ATA host templates are not modified.

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com> (for DWC AHCI SATA)
Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com> (for Tegra)
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Mike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-5-bvanassche@acm.org


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e0d3f2c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg
static int acard_ahci_pci_device_resume(struct pci_dev *pdev);
#endif

static struct scsi_host_template acard_ahci_sht = {
static const struct scsi_host_template acard_ahci_sht = {
	AHCI_SHT("acard-ahci"),
};

+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ static int ahci_pci_device_resume(struct device *dev);
#endif
#endif /* CONFIG_PM */

static struct scsi_host_template ahci_sht = {
static const struct scsi_host_template ahci_sht = {
	AHCI_SHT("ahci"),
};

+1 −1
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ void ahci_set_em_messages(struct ahci_host_priv *hpriv,
			  struct ata_port_info *pi);
int ahci_reset_em(struct ata_host *host);
void ahci_print_info(struct ata_host *host, const char *scc_s);
int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht);
int ahci_host_activate(struct ata_host *host, const struct scsi_host_template *sht);
void ahci_error_handler(struct ata_port *ap);
u32 ahci_handle_port_intr(struct ata_host *host, u32 irq_masked);

+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ static int __maybe_unused brcm_ahci_resume(struct device *dev)
	return ret;
}

static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
	AHCI_SHT(DRV_NAME),
};

+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static void ahci_ceva_setup(struct ahci_host_priv *hpriv)
	}
}

static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
	AHCI_SHT(DRV_NAME),
};

Loading