提交 288623a0 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

libata: clean up port_ops->sff_irq_clear()

->sff_irq_clear() is called only from SFF interrupt handler, so there
is no reason to initialize it for non-SFF controllers.  Also,
ata_sff_irq_clear() can handle both BMDMA and non-BMDMA SFF
controllers.

This patch kills ata_noop_irq_clear() and removes it from base
port_ops and sets ->sff_irq_clear to ata_sff_irq_clear() in sff
port_ops instead of bmdma port_ops.
Signed-off-by: NTejun Heo <htejun@gmail.com>
上级 5682ed33
...@@ -74,7 +74,6 @@ const unsigned long sata_deb_timing_hotplug[] = { 25, 500, 2000 }; ...@@ -74,7 +74,6 @@ const unsigned long sata_deb_timing_hotplug[] = { 25, 500, 2000 };
const unsigned long sata_deb_timing_long[] = { 100, 2000, 5000 }; const unsigned long sata_deb_timing_long[] = { 100, 2000, 5000 };
const struct ata_port_operations ata_base_port_ops = { const struct ata_port_operations ata_base_port_ops = {
.sff_irq_clear = ata_noop_irq_clear,
.prereset = ata_sff_prereset, .prereset = ata_sff_prereset,
.hardreset = sata_sff_hardreset, .hardreset = sata_sff_hardreset,
.postreset = ata_sff_postreset, .postreset = ata_sff_postreset,
...@@ -386,14 +385,6 @@ int atapi_cmd_type(u8 opcode) ...@@ -386,14 +385,6 @@ int atapi_cmd_type(u8 opcode)
} }
} }
/**
* ata_noop_irq_clear - Noop placeholder for irq_clear
* @ap: Port associated with this ATA transaction.
*/
void ata_noop_irq_clear(struct ata_port *ap)
{
}
/** /**
* ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure
* @tf: Taskfile to convert * @tf: Taskfile to convert
...@@ -6108,7 +6099,6 @@ EXPORT_SYMBOL_GPL(ata_port_start); ...@@ -6108,7 +6099,6 @@ EXPORT_SYMBOL_GPL(ata_port_start);
EXPORT_SYMBOL_GPL(ata_do_set_mode); EXPORT_SYMBOL_GPL(ata_do_set_mode);
EXPORT_SYMBOL_GPL(ata_std_qc_defer); EXPORT_SYMBOL_GPL(ata_std_qc_defer);
EXPORT_SYMBOL_GPL(ata_noop_qc_prep); EXPORT_SYMBOL_GPL(ata_noop_qc_prep);
EXPORT_SYMBOL_GPL(ata_noop_irq_clear);
EXPORT_SYMBOL_GPL(ata_port_probe); EXPORT_SYMBOL_GPL(ata_port_probe);
EXPORT_SYMBOL_GPL(ata_dev_disable); EXPORT_SYMBOL_GPL(ata_dev_disable);
EXPORT_SYMBOL_GPL(sata_set_spd); EXPORT_SYMBOL_GPL(sata_set_spd);
......
...@@ -58,6 +58,7 @@ const struct ata_port_operations ata_sff_port_ops = { ...@@ -58,6 +58,7 @@ const struct ata_port_operations ata_sff_port_ops = {
.sff_exec_command = ata_sff_exec_command, .sff_exec_command = ata_sff_exec_command,
.sff_data_xfer = ata_sff_data_xfer, .sff_data_xfer = ata_sff_data_xfer,
.sff_irq_on = ata_sff_irq_on, .sff_irq_on = ata_sff_irq_on,
.sff_irq_clear = ata_sff_irq_clear,
.port_start = ata_sff_port_start, .port_start = ata_sff_port_start,
}; };
...@@ -71,7 +72,6 @@ const struct ata_port_operations ata_bmdma_port_ops = { ...@@ -71,7 +72,6 @@ const struct ata_port_operations ata_bmdma_port_ops = {
.bmdma_start = ata_bmdma_start, .bmdma_start = ata_bmdma_start,
.bmdma_stop = ata_bmdma_stop, .bmdma_stop = ata_bmdma_stop,
.bmdma_status = ata_bmdma_status, .bmdma_status = ata_bmdma_status,
.sff_irq_clear = ata_sff_irq_clear,
}; };
/** /**
......
...@@ -896,7 +896,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s, ...@@ -896,7 +896,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s,
unsigned int ofs, unsigned int len); unsigned int ofs, unsigned int len);
extern void ata_id_c_string(const u16 *id, unsigned char *s, extern void ata_id_c_string(const u16 *id, unsigned char *s,
unsigned int ofs, unsigned int len); unsigned int ofs, unsigned int len);
extern void ata_noop_irq_clear(struct ata_port *ap);
extern void ata_qc_complete(struct ata_queued_cmd *qc); extern void ata_qc_complete(struct ata_queued_cmd *qc);
extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active, extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active,
void (*finish_qc)(struct ata_queued_cmd *)); void (*finish_qc)(struct ata_queued_cmd *));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册