diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-06-17 14:30:18 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-06-17 14:30:18 +0000 |
commit | eda84c41d7be4c76c251d8fdbdbfd9e635f386ff (patch) | |
tree | f6d66cf37dcff9c1caf8e37d614ef3dfa3947566 /target/linux/adm5120/files/drivers/ata | |
parent | 1ddb98be17c1f06520e83f6cdc91361034a94aa3 (diff) |
[adm5120] switch to 2.6.25.7
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11526 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 7dd697721..8c0a0a36c 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) |