1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-17 22:48:02 +03:00
openwrt-xburst/target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch
juhosg 33d5882433 [adm5120] refresh patches to match upstream style
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11374 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-06-06 08:54:13 +00:00

31 lines
768 B
Diff

--- a/drivers/ata/pata_rb153_cf.c
+++ b/drivers/ata/pata_rb153_cf.c
@@ -68,20 +68,23 @@
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 t;
+
+ t = buflen;
if (write_data) {
- for (; buflen > 0; buflen--, buf++)
+ for (; t > 0; t--, buf++)
writeb(*buf, ioaddr);
} else {
- for (; buflen > 0; buflen--, buf++)
+ for (; t > 0; t--, buf++)
*buf = readb(ioaddr);
}
rb153_pata_finish_io(adev->link->ap);
+ return buflen;
}
static void rb153_pata_freeze(struct ata_port *ap)