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