Skip to content

Commit

Permalink
[libata] Remove ->port_disable() hook
Browse files Browse the repository at this point in the history
It was always set to ata_port_disable().  Removed the hook, and replaced
the very few ap->ops->port_disable() callsites with direct calls to
ata_port_disable().

Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jeff Garzik committed Oct 12, 2007
1 parent 7d73a36 commit ac8869d
Show file tree
Hide file tree
Showing 67 changed files with 3 additions and 132 deletions.
4 changes: 0 additions & 4 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ static struct scsi_host_template ahci_sht = {
};

static const struct ata_port_operations ahci_ops = {
.port_disable = ata_port_disable,

.check_status = ahci_check_status,
.check_altstatus = ahci_check_status,
.dev_select = ata_noop_dev_select,
Expand Down Expand Up @@ -296,8 +294,6 @@ static const struct ata_port_operations ahci_ops = {
};

static const struct ata_port_operations ahci_vt8251_ops = {
.port_disable = ata_port_disable,

.check_status = ahci_check_status,
.check_altstatus = ahci_check_status,
.dev_select = ata_noop_dev_select,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/ata_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ static struct scsi_host_template generic_sht = {
static struct ata_port_operations generic_port_ops = {
.set_mode = generic_set_mode,

.port_disable = ata_port_disable,
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
.check_status = ata_check_status,
Expand Down
4 changes: 0 additions & 4 deletions drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ static struct scsi_host_template piix_sht = {
};

static const struct ata_port_operations piix_pata_ops = {
.port_disable = ata_port_disable,
.set_piomode = piix_set_piomode,
.set_dmamode = piix_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -323,7 +322,6 @@ static const struct ata_port_operations piix_pata_ops = {
};

static const struct ata_port_operations ich_pata_ops = {
.port_disable = ata_port_disable,
.set_piomode = piix_set_piomode,
.set_dmamode = ich_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -356,8 +354,6 @@ static const struct ata_port_operations ich_pata_ops = {
};

static const struct ata_port_operations piix_sata_ops = {
.port_disable = ata_port_disable,

.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
.check_status = ata_check_status,
Expand Down
4 changes: 1 addition & 3 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,6 @@ int ata_bus_probe(struct ata_port *ap)

/* no device present, disable port */
ata_port_disable(ap);
ap->ops->port_disable(ap);
return -ENODEV;

fail:
Expand Down Expand Up @@ -3227,7 +3226,7 @@ void ata_bus_reset(struct ata_port *ap)

err_out:
ata_port_printk(ap, KERN_ERR, "disabling port\n");
ap->ops->port_disable(ap);
ata_port_disable(ap);

DPRINTK("EXIT\n");
}
Expand Down Expand Up @@ -6986,7 +6985,6 @@ static unsigned int ata_dummy_qc_issue(struct ata_queued_cmd *qc)
}

const struct ata_port_operations ata_dummy_port_ops = {
.port_disable = ata_port_disable,
.check_status = ata_dummy_check_status,
.check_altstatus = ata_dummy_check_status,
.dev_select = ata_noop_dev_select,
Expand Down
5 changes: 0 additions & 5 deletions drivers/ata/pata_ali.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ static struct scsi_host_template ali_sht = {
*/

static struct ata_port_operations ali_early_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = ali_set_piomode,
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
Expand Down Expand Up @@ -336,8 +335,6 @@ static struct ata_port_operations ali_early_port_ops = {
* detect
*/
static struct ata_port_operations ali_20_port_ops = {
.port_disable = ata_port_disable,

.set_piomode = ali_set_piomode,
.set_dmamode = ali_set_dmamode,
.mode_filter = ali_20_filter,
Expand Down Expand Up @@ -376,7 +373,6 @@ static struct ata_port_operations ali_20_port_ops = {
* Port operations for DMA capable ALi with cable detect
*/
static struct ata_port_operations ali_c2_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = ali_set_piomode,
.set_dmamode = ali_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -414,7 +410,6 @@ static struct ata_port_operations ali_c2_port_ops = {
* Port operations for DMA capable ALi with cable detect and LBA48
*/
static struct ata_port_operations ali_c5_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = ali_set_piomode,
.set_dmamode = ali_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
6 changes: 0 additions & 6 deletions drivers/ata/pata_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ static struct scsi_host_template amd_sht = {
};

static struct ata_port_operations amd33_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = amd33_set_piomode,
.set_dmamode = amd33_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -366,7 +365,6 @@ static struct ata_port_operations amd33_port_ops = {
};

static struct ata_port_operations amd66_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = amd66_set_piomode,
.set_dmamode = amd66_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -400,7 +398,6 @@ static struct ata_port_operations amd66_port_ops = {
};

static struct ata_port_operations amd100_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = amd100_set_piomode,
.set_dmamode = amd100_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -434,7 +431,6 @@ static struct ata_port_operations amd100_port_ops = {
};

static struct ata_port_operations amd133_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = amd133_set_piomode,
.set_dmamode = amd133_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -468,7 +464,6 @@ static struct ata_port_operations amd133_port_ops = {
};

static struct ata_port_operations nv100_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = nv100_set_piomode,
.set_dmamode = nv100_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -502,7 +497,6 @@ static struct ata_port_operations nv100_port_ops = {
};

static struct ata_port_operations nv133_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = nv133_set_piomode,
.set_dmamode = nv133_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
2 changes: 0 additions & 2 deletions drivers/ata/pata_artop.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ static struct scsi_host_template artop_sht = {
};

static const struct ata_port_operations artop6210_ops = {
.port_disable = ata_port_disable,
.set_piomode = artop6210_set_piomode,
.set_dmamode = artop6210_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -366,7 +365,6 @@ static const struct ata_port_operations artop6210_ops = {
};

static const struct ata_port_operations artop6260_ops = {
.port_disable = ata_port_disable,
.set_piomode = artop6260_set_piomode,
.set_dmamode = artop6260_set_dmamode,

Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ static struct scsi_host_template atiixp_sht = {
};

static struct ata_port_operations atiixp_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = atiixp_set_piomode,
.set_dmamode = atiixp_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_cmd640.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ static struct scsi_host_template cmd640_sht = {
};

static struct ata_port_operations cmd640_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cmd640_set_piomode,
.mode_filter = ata_pci_default_filter,
.tf_load = ata_tf_load,
Expand Down
3 changes: 0 additions & 3 deletions drivers/ata/pata_cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ static struct scsi_host_template cmd64x_sht = {
};

static struct ata_port_operations cmd64x_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cmd64x_set_piomode,
.set_dmamode = cmd64x_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -318,7 +317,6 @@ static struct ata_port_operations cmd64x_port_ops = {
};

static struct ata_port_operations cmd646r1_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cmd64x_set_piomode,
.set_dmamode = cmd64x_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -352,7 +350,6 @@ static struct ata_port_operations cmd646r1_port_ops = {
};

static struct ata_port_operations cmd648_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cmd64x_set_piomode,
.set_dmamode = cmd64x_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ static struct scsi_host_template cs5520_sht = {
};

static struct ata_port_operations cs5520_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cs5520_set_piomode,
.set_dmamode = cs5520_set_dmamode,

Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ static struct scsi_host_template cs5530_sht = {
};

static struct ata_port_operations cs5530_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cs5530_set_piomode,
.set_dmamode = cs5530_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_cs5535.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ static struct scsi_host_template cs5535_sht = {
};

static struct ata_port_operations cs5535_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cs5535_set_piomode,
.set_dmamode = cs5535_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_cypress.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ static struct scsi_host_template cy82c693_sht = {
};

static struct ata_port_operations cy82c693_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = cy82c693_set_piomode,
.set_dmamode = cy82c693_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_efar.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ static struct scsi_host_template efar_sht = {
};

static const struct ata_port_operations efar_ops = {
.port_disable = ata_port_disable,
.set_piomode = efar_set_piomode,
.set_dmamode = efar_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ static struct scsi_host_template hpt36x_sht = {
*/

static struct ata_port_operations hpt366_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt366_set_piomode,
.set_dmamode = hpt366_set_dmamode,
.mode_filter = hpt366_filter,
Expand Down
4 changes: 0 additions & 4 deletions drivers/ata/pata_hpt37x.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ static struct scsi_host_template hpt37x_sht = {
*/

static struct ata_port_operations hpt370_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt370_set_piomode,
.set_dmamode = hpt370_set_dmamode,
.mode_filter = hpt370_filter,
Expand Down Expand Up @@ -682,7 +681,6 @@ static struct ata_port_operations hpt370_port_ops = {
*/

static struct ata_port_operations hpt370a_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt370_set_piomode,
.set_dmamode = hpt370_set_dmamode,
.mode_filter = hpt370a_filter,
Expand Down Expand Up @@ -721,7 +719,6 @@ static struct ata_port_operations hpt370a_port_ops = {
*/

static struct ata_port_operations hpt372_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt372_set_piomode,
.set_dmamode = hpt372_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -760,7 +757,6 @@ static struct ata_port_operations hpt372_port_ops = {
*/

static struct ata_port_operations hpt374_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt372_set_piomode,
.set_dmamode = hpt372_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_hpt3x2n.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ static struct scsi_host_template hpt3x2n_sht = {
*/

static struct ata_port_operations hpt3x2n_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt3x2n_set_piomode,
.set_dmamode = hpt3x2n_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_hpt3x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ static struct scsi_host_template hpt3x3_sht = {
};

static struct ata_port_operations hpt3x3_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = hpt3x3_set_piomode,
#if defined(CONFIG_PATA_HPT3X3_DMA)
.set_dmamode = hpt3x3_set_dmamode,
Expand Down
2 changes: 0 additions & 2 deletions drivers/ata/pata_icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ static void pata_icside_error_handler(struct ata_port *ap)
}

static struct ata_port_operations pata_icside_port_ops = {
.port_disable = ata_port_disable,

.set_dmamode = pata_icside_set_dmamode,

.tf_load = ata_tf_load,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_isapnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ static struct scsi_host_template isapnp_sht = {
};

static struct ata_port_operations isapnp_port_ops = {
.port_disable = ata_port_disable,
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
.check_status = ata_check_status,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_it8213.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ static struct scsi_host_template it8213_sht = {
};

static const struct ata_port_operations it8213_ops = {
.port_disable = ata_port_disable,
.set_piomode = it8213_set_piomode,
.set_dmamode = it8213_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
2 changes: 0 additions & 2 deletions drivers/ata/pata_it821x.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ static struct scsi_host_template it821x_sht = {

static struct ata_port_operations it821x_smart_port_ops = {
.set_mode = it821x_smart_set_mode,
.port_disable = ata_port_disable,
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
.mode_filter = ata_pci_default_filter,
Expand Down Expand Up @@ -655,7 +654,6 @@ static struct ata_port_operations it821x_smart_port_ops = {
};

static struct ata_port_operations it821x_passthru_port_ops = {
.port_disable = ata_port_disable,
.set_piomode = it821x_passthru_set_piomode,
.set_dmamode = it821x_passthru_set_dmamode,
.mode_filter = ata_pci_default_filter,
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pata_ixp4xx_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ static struct ata_port_operations ixp4xx_port_ops = {
.set_mode = ixp4xx_set_mode,
.mode_filter = ata_pci_default_filter,

.port_disable = ata_port_disable,
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
.exec_command = ata_exec_command,
Expand Down
2 changes: 0 additions & 2 deletions drivers/ata/pata_jmicron.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ static struct scsi_host_template jmicron_sht = {
};

static const struct ata_port_operations jmicron_ops = {
.port_disable = ata_port_disable,

/* Task file is PCI ATA format, use helpers */
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
Expand Down
Loading

0 comments on commit ac8869d

Please sign in to comment.