27ae067d9000db704818f657ff3ffef99cd4e1dc
[openwrt.git] / target / linux / adm5120 / patches-2.6.25 / 910-pata_rb153_cf_fix_compiler_warning.patch
1 --- a/drivers/ata/pata_rb153_cf.c
2 +++ b/drivers/ata/pata_rb153_cf.c
3 @@ -68,20 +68,23 @@
4 rb153_pata_finish_io(ap);
5 }
6
7 -static void rb153_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
8 +static unsigned int rb153_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
9 unsigned int buflen, int write_data)
10 {
11 void __iomem *ioaddr = adev->link->ap->ioaddr.data_addr;
12 -
13 + unsigned int t;
14 +
15 + t = buflen;
16 if (write_data) {
17 - for (; buflen > 0; buflen--, buf++)
18 + for (; t > 0; t--, buf++)
19 writeb(*buf, ioaddr);
20 } else {
21 - for (; buflen > 0; buflen--, buf++)
22 + for (; t > 0; t--, buf++)
23 *buf = readb(ioaddr);
24 }
25
26 rb153_pata_finish_io(adev->link->ap);
27 + return buflen;
28 }
29
30 static void rb153_pata_freeze(struct ata_port *ap)
This page took 0.042146 seconds and 3 git commands to generate.