summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch
blob: 27ae067d9000db704818f657ff3ffef99cd4e1dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- 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)