From 358f9a77a668660729e705fde9c3cf69f013aa98 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 25 Mar 2008 12:22:47 +0900 Subject: libata: implement and use ata_noop_irq_clear() ->irq_clear() is used to clear IRQ bit of a SFF controller and isn't useful for drivers which don't use libata SFF HSM implementation. However, it's a required callback and many drivers implement their own noop version as placeholder. This patch implements ata_noop_irq_clear and use it to replace those custom placeholders. Also, SFF drivers which don't support BMDMA don't need to use ata_bmdma_irq_clear(). It becomes noop if BMDMA address isn't initialized. Convert them to use ata_noop_irq_clear(). Signed-off-by: Tejun Heo --- drivers/ata/sata_mv.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'drivers/ata/sata_mv.c') diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index a4944c8..b3b3da4 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -461,7 +461,6 @@ struct mv_hw_ops { void (*reset_bus)(struct ata_host *host, void __iomem *mmio); }; -static void mv_irq_clear(struct ata_port *ap); static int mv_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val); static int mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val); static int mv5_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val); @@ -564,7 +563,7 @@ static const struct ata_port_operations mv5_ops = { .qc_issue = mv_qc_issue, .data_xfer = ata_data_xfer, - .irq_clear = mv_irq_clear, + .irq_clear = ata_noop_irq_clear, .irq_on = ata_irq_on, .error_handler = mv_error_handler, @@ -592,7 +591,7 @@ static const struct ata_port_operations mv6_ops = { .qc_issue = mv_qc_issue, .data_xfer = ata_data_xfer, - .irq_clear = mv_irq_clear, + .irq_clear = ata_noop_irq_clear, .irq_on = ata_irq_on, .error_handler = mv_error_handler, @@ -620,7 +619,7 @@ static const struct ata_port_operations mv_iie_ops = { .qc_issue = mv_qc_issue, .data_xfer = ata_data_xfer, - .irq_clear = mv_irq_clear, + .irq_clear = ata_noop_irq_clear, .irq_on = ata_irq_on, .error_handler = mv_error_handler, @@ -801,10 +800,6 @@ static inline int mv_get_hc_count(unsigned long port_flags) return ((port_flags & MV_FLAG_DUAL_HC) ? 2 : 1); } -static void mv_irq_clear(struct ata_port *ap) -{ -} - static void mv_set_edma_ptrs(void __iomem *port_mmio, struct mv_host_priv *hpriv, struct mv_port_priv *pp) -- cgit v1.1