refresh patches
[openwrt/svn-archive/archive.git] / target / linux / rb532 / patches-2.6.28 / 006-pata_rb532_cf_fix_prototype.patch
1 Per definition, this function should return the number of bytes
2 consumed. Also take care of the unlikely case when buflen is not a
3 multiple of four; while transferring, the division cuts the remaining
4 bytes, so alter the return value accordingly.
5
6 Signed-off-by: Phil Sutter <n0-1@freewrt.org>
7 ---
8 --- a/drivers/ata/pata_rb532_cf.c
9 +++ b/drivers/ata/pata_rb532_cf.c
10 @@ -88,7 +88,7 @@ static unsigned int rb532_pata_data_xfer
11 readsl(ioaddr, buf, buflen / sizeof(u32));
12
13 rb532_pata_finish_io(adev->link->ap);
14 - return retlen;
15 + return buflen - (buflen % sizeof(u32));;
16 }
17
18 static void rb532_pata_freeze(struct ata_port *ap)