diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-06-17 14:30:18 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-06-17 14:30:18 +0000 |
commit | 13bb189a1500a306e8611b9e734eed8b8a46506e (patch) | |
tree | 5a28619b0bb967d37ebdb9a0ef0a7a40fa2747cc /target/linux/adm5120/files/drivers/ata | |
parent | 2ccf25789e09a6745270c8976917f4ccd5c68797 (diff) | |
download | upstream-13bb189a1500a306e8611b9e734eed8b8a46506e.tar.gz upstream-13bb189a1500a306e8611b9e734eed8b8a46506e.tar.bz2 upstream-13bb189a1500a306e8611b9e734eed8b8a46506e.zip |
switch to 2.6.25.7
SVN-Revision: 11526
Diffstat (limited to 'target/linux/adm5120/files/drivers/ata')
-rw-r--r-- | target/linux/adm5120/files/drivers/ata/pata_rb153_cf.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/target/linux/adm5120/files/drivers/ata/pata_rb153_cf.c b/target/linux/adm5120/files/drivers/ata/pata_rb153_cf.c index 7dd697721b..8c0a0a36cc 100644 --- a/target/linux/adm5120/files/drivers/ata/pata_rb153_cf.c +++ b/target/linux/adm5120/files/drivers/ata/pata_rb153_cf.c @@ -68,20 +68,23 @@ static void rb153_pata_exec_command(struct ata_port *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 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) |