]> err.no Git - linux-2.6/commitdiff
pata_pcmcia: convert to new data_xfer prototype
authorTejun Heo <htejun@gmail.com>
Wed, 2 Jan 2008 11:12:47 +0000 (20:12 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 23 Jan 2008 10:24:15 +0000 (05:24 -0500)
While merging data_xfer prototype change, pata_pcmcia was left out.
Convert it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/pata_pcmcia.c

index ceba93b7754ef911a750d390f673e29848bf2f53..3e7f6a9da28bd941965c1d5fd887be1054347a7c 100644 (file)
@@ -102,10 +102,10 @@ static int pcmcia_set_mode_8bit(struct ata_link *link,
 
 /**
  *     ata_data_xfer_8bit       -      Transfer data by 8bit PIO
- *     @adev: device to target
+ *     @dev: device to target
  *     @buf: data buffer
  *     @buflen: buffer length
- *     @write_data: read/write
+ *     @rw: read/write
  *
  *     Transfer data from/to the device data register by 8 bit PIO.
  *
@@ -113,14 +113,17 @@ static int pcmcia_set_mode_8bit(struct ata_link *link,
  *     Inherited from caller.
  */
 
-static void ata_data_xfer_8bit(struct ata_device *adev, unsigned char *buf,
-                  unsigned int buflen, int write_data)
+static unsigned int ata_data_xfer_8bit(struct ata_device *dev,
+                               unsigned char *buf, unsigned int buflen, int rw)
 {
-       struct ata_port *ap = adev->link->ap;
-       if (write_data)
-               iowrite8_rep(ap->ioaddr.data_addr, buf, buflen);
-       else
+       struct ata_port *ap = dev->link->ap;
+
+       if (rw == READ)
                ioread8_rep(ap->ioaddr.data_addr, buf, buflen);
+       else
+               iowrite8_rep(ap->ioaddr.data_addr, buf, buflen);
+
+       return buflen;
 }