lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / adm5120 / files / drivers / ata / pata_rb153_cf.c
index 7dd6977..8c0a0a3 100644 (file)
@@ -68,20 +68,23 @@ static void rb153_pata_exec_command(struct ata_port *ap,
        rb153_pata_finish_io(ap);
 }
 
        rb153_pata_finish_io(ap);
 }
 
-static void rb153_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
+static unsigned int rb153_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
                                unsigned int buflen, int write_data)
 {
        void __iomem *ioaddr = adev->link->ap->ioaddr.data_addr;
                                unsigned int buflen, int write_data)
 {
        void __iomem *ioaddr = adev->link->ap->ioaddr.data_addr;
-
+       unsigned int t;
+       
+       t = buflen;     
        if (write_data) {
        if (write_data) {
-               for (; buflen > 0; buflen--, buf++)
+               for (; t > 0; t--, buf++)
                        writeb(*buf, ioaddr);
        } else {
                        writeb(*buf, ioaddr);
        } else {
-               for (; buflen > 0; buflen--, buf++)
+               for (; t > 0; t--, buf++)
                        *buf = readb(ioaddr);
        }
 
        rb153_pata_finish_io(adev->link->ap);
                        *buf = readb(ioaddr);
        }
 
        rb153_pata_finish_io(adev->link->ap);
+       return buflen;
 }
 
 static void rb153_pata_freeze(struct ata_port *ap)
 }
 
 static void rb153_pata_freeze(struct ata_port *ap)
This page took 0.023074 seconds and 4 git commands to generate.