pata-rb532-cf: use ata_sff_data_xfer32()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:31 pm

Gitweb:     http://git.kernel.org/linus/180bd147f18316d92bd5f59aebc9932cabc03edd
Commit:     180bd147f18316d92bd5f59aebc9932cabc03edd
Parent:     bff9ad3c4c8fff340854d3912196ed470f94602c
Author:     Phil Sutter <n0-1@freewrt.org>
AuthorDate: Tue Jan 27 14:35:52 2009 +0100
Committer:  Jeff Garzik <jgarzik@redhat.com>
CommitDate: Tue Mar 24 22:02:39 2009 -0400

    pata-rb532-cf: use ata_sff_data_xfer32()
    
    The biggest difference between rb532_pata_data_xfer() and
    ata_sff_data_xfer32() is the call to ata_sff_pause() at the end of
    rb532_pata_data_xfer() which I suppose to be unnecessary since it works
    without. I've also tested using ata_sff_data_xfer() as replacement, but
    since we know that the driver supports 32bit IO, using the optimised
    version should be safe.
    
    Signed-off-by: Phil Sutter <n0-1@freewrt.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
---
 drivers/ata/pata_rb532_cf.c |   21 +--------------------
 1 files changed, 1 insertions(+), 20 deletions(-)

diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 9d61ce5..9fb91e4 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -54,25 +54,6 @@ struct rb532_cf_info {
 
 /* ------------------------------------------------------------------------ */
 
-static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
-				unsigned int buflen, int write_data)
-{
-	struct ata_port *ap = adev->link->ap;
-	void __iomem *ioaddr = ap->ioaddr.data_addr;
-	int retlen = buflen;
-
-	if (write_data) {
-		for (; buflen > 0; buflen--, buf++)
-			writeb(*buf, ioaddr);
-	} else {
-		for (; buflen > 0; buflen--, buf++)
-			*buf = readb(ioaddr);
-	}
-
-	ata_sff_pause(ap);
-	return retlen;
-}
-
 static void rb532_pata_freeze(struct ata_port *ap)
 {
 	struct rb532_cf_info *info = ap->host->private_data;
@@ -105,7 +86,7 @@ static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
 
 static struct ata_port_operations rb532_pata_port_ops = {
 	.inherits		= &ata_sff_port_ops,
-	.sff_data_xfer		= rb532_pata_data_xfer,
+	.sff_data_xfer		= ata_sff_data_xfer32,
 	.freeze			= rb532_pata_freeze,
 	.thaw			= rb532_pata_thaw,
 };
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
pata-rb532-cf: use ata_sff_data_xfer32(), Linux Kernel Mailing ..., (Thu Mar 26, 12:31 pm)