]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 30 Aug 2006 22:30:38 +0000 (23:30 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 30 Aug 2006 22:30:38 +0000 (23:30 +0100)
1  2 
drivers/mtd/nand/nand_base.c

index 119d17cdb780c2ee4c5c200e5296fac9acd9efdc,c8cbc00243fece8bd9da98ef160e76d89e57b8ea..975b2ef611215061de098d5027cd72b63cb47463
@@@ -1093,9 -1093,10 +1093,10 @@@ static int nand_read(struct mtd_info *m
  
        ret = nand_do_read_ops(mtd, from, &chip->ops);
  
+       *retlen = chip->ops.retlen;
        nand_release_device(mtd);
  
-       *retlen = chip->ops.retlen;
        return ret;
  }
  
@@@ -1203,7 -1204,7 +1204,7 @@@ static int nand_write_oob_syndrome(stru
                pos = steps * (eccsize + chunk);
                steps = 0;
        } else
 -              pos = eccsize + chunk;
 +              pos = eccsize;
  
        chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page);
        for (i = 0; i < steps; i++) {
@@@ -1566,7 -1567,7 +1567,7 @@@ static uint8_t *nand_fill_oob(struct na
                                bytes = min_t(size_t, len, free->length);
                                boffs = free->offset;
                        }
 -                      memcpy(chip->oob_poi + woffs, oob, bytes);
 +                      memcpy(chip->oob_poi + boffs, oob, bytes);
                        oob += bytes;
                }
                return oob;
@@@ -1691,9 -1692,10 +1692,10 @@@ static int nand_write(struct mtd_info *
  
        ret = nand_do_write_ops(mtd, to, &chip->ops);
  
+       *retlen = chip->ops.retlen;
        nand_release_device(mtd);
  
-       *retlen = chip->ops.retlen;
        return ret;
  }
  
@@@ -2222,7 -2224,7 +2224,7 @@@ static struct nand_flash_dev *nand_get_
        }
  
        /* Try to identify manufacturer */
 -      for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_id++) {
 +      for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_idx++) {
                if (nand_manuf_ids[maf_idx].id == *maf_id)
                        break;
        }