libata: const-ification bombing run
Enforce access rules where appropriate. If the compiler is smart enough, this may buy us an optimization or two as a side effect.
This commit is contained in:
@@ -87,8 +87,8 @@ static void pdc_port_stop(struct ata_port *ap);
|
||||
static void pdc_pata_phy_reset(struct ata_port *ap);
|
||||
static void pdc_sata_phy_reset(struct ata_port *ap);
|
||||
static void pdc_qc_prep(struct ata_queued_cmd *qc);
|
||||
static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf);
|
||||
static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf);
|
||||
static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
|
||||
static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
|
||||
static void pdc_irq_clear(struct ata_port *ap);
|
||||
static int pdc_qc_issue_prot(struct ata_queued_cmd *qc);
|
||||
|
||||
@@ -113,7 +113,7 @@ static Scsi_Host_Template pdc_ata_sht = {
|
||||
.ordered_flush = 1,
|
||||
};
|
||||
|
||||
static struct ata_port_operations pdc_sata_ops = {
|
||||
static const struct ata_port_operations pdc_sata_ops = {
|
||||
.port_disable = ata_port_disable,
|
||||
.tf_load = pdc_tf_load_mmio,
|
||||
.tf_read = ata_tf_read,
|
||||
@@ -136,7 +136,7 @@ static struct ata_port_operations pdc_sata_ops = {
|
||||
.host_stop = ata_pci_host_stop,
|
||||
};
|
||||
|
||||
static struct ata_port_operations pdc_pata_ops = {
|
||||
static const struct ata_port_operations pdc_pata_ops = {
|
||||
.port_disable = ata_port_disable,
|
||||
.tf_load = pdc_tf_load_mmio,
|
||||
.tf_read = ata_tf_read,
|
||||
@@ -546,7 +546,7 @@ static int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||
return ata_qc_issue_prot(qc);
|
||||
}
|
||||
|
||||
static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
|
||||
static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
|
||||
{
|
||||
WARN_ON (tf->protocol == ATA_PROT_DMA ||
|
||||
tf->protocol == ATA_PROT_NODATA);
|
||||
@@ -554,7 +554,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
|
||||
}
|
||||
|
||||
|
||||
static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf)
|
||||
static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
|
||||
{
|
||||
WARN_ON (tf->protocol == ATA_PROT_DMA ||
|
||||
tf->protocol == ATA_PROT_NODATA);
|
||||
|
Reference in New Issue
Block a user