diff options
Diffstat (limited to 'target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch')
-rw-r--r-- | target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch b/target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch new file mode 100644 index 0000000000..629ec65136 --- /dev/null +++ b/target/linux/adm5120/patches-2.6.25/910-pata_rb153_cf_fix_compiler_warning.patch @@ -0,0 +1,32 @@ +Index: linux-2.6.25.1/drivers/ata/pata_rb153_cf.c +=================================================================== +--- linux-2.6.25.1.orig/drivers/ata/pata_rb153_cf.c ++++ linux-2.6.25.1/drivers/ata/pata_rb153_cf.c +@@ -68,20 +68,23 @@ static void rb153_pata_exec_command(stru + 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) |