mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-19 01:09:20 +03:00
47fedb5947
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14884 3c298f89-4303-0410-b956-a3cf2f4a3e73
20 lines
791 B
Diff
20 lines
791 B
Diff
Per definition, this function should return the number of bytes
|
|
consumed. Also take care of the unlikely case when buflen is not a
|
|
multiple of four; while transferring, the division cuts the remaining
|
|
bytes, so alter the return value accordingly.
|
|
|
|
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
|
|
---
|
|
diff -urN linux-2.6.28.7/drivers/ata/pata_rb532_cf.c linux-2.6.28.7.new/drivers/ata/pata_rb532_cf.c
|
|
--- linux-2.6.28.7/drivers/ata/pata_rb532_cf.c 2009-03-15 13:29:09.000000000 +0100
|
|
+++ linux-2.6.28.7.new/drivers/ata/pata_rb532_cf.c 2009-03-15 13:29:46.000000000 +0100
|
|
@@ -88,7 +88,7 @@
|
|
readsl(ioaddr, buf, buflen / sizeof(u32));
|
|
|
|
rb532_pata_finish_io(adev->link->ap);
|
|
- return retlen;
|
|
+ return buflen - (buflen % sizeof(u32));;
|
|
}
|
|
|
|
static void rb532_pata_freeze(struct ata_port *ap)
|