[rb532] nuke empty directory
[openwrt/svn-archive/archive.git] / target / linux / rb532 / patches-2.6.27 / 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 drivers/ata/pata_rb532_cf.c | 3 ++-
9 1 files changed, 2 insertions(+), 1 deletions(-)
10
11 diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
12 index b919012..95a0d66 100644
13 --- a/drivers/ata/pata_rb532_cf.c
14 +++ b/drivers/ata/pata_rb532_cf.c
15 @@ -75,7 +75,7 @@ static void rb532_pata_exec_command(struct ata_port *ap,
16 rb532_pata_finish_io(ap);
17 }
18
19 -static void rb532_pata_data_xfer(struct ata_device *adev,
20 +static unsigned int rb532_pata_data_xfer(struct ata_device *adev,
21 unsigned char *buf, unsigned int buflen, int write_data)
22 {
23 struct ata_port *ap = adev->link->ap;
24 @@ -87,6 +87,7 @@ static void rb532_pata_data_xfer(struct ata_device *adev,
25 readsl(ioaddr, buf, buflen / sizeof(u32));
26
27 rb532_pata_finish_io(adev->link->ap);
28 + return buflen - (buflen % sizeof(u32));
29 }
30
31 static void rb532_pata_freeze(struct ata_port *ap)
32 --
33 1.5.6.4
34
35