aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-09 10:34:55 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-09 10:34:55 -0800
commit6e96783f586cc0a64651087cb518209a8577123f (patch)
tree8b74a5a8fda055ffeaa0c1ae3c070772599f8b3b /drivers/mtd/mtdpart.c
parent8466c833799b30ab343c5108cd2e460f9f16c9d8 (diff)
parent0feba829ee82a6e43baabe3f0bdf91bd937a67a1 (diff)
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: [JFFS2] print a message when marking bad block [JFFS2] Check for all-zero node headers [MTD] [OneNAND] Classify the page data and oob buffer [MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finished [MTD] [OneNAND] add Nokia Copyright and a credit [MTD] [OneNAND] Fix typo & wrong comments [MTD] [OneNAND] Use oob buffer instead of main one in oob functions [MTD] Correct partition failed erase address [JFFS2] Use yield() between GC passes in background thread. [MTD] [NAND] Correct misspelled preprocessor variable. [MTD] [MAPS] dilnetpc: Fix printk warning [MTD] [NOR] Fix oops in cfi_amdstd_sync [MTD] ESB2 check for closed ROM window [JFFS2] Fix writebuffer recovery in the first page of a block [MTD] [NAND] make oobavail public
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 633def3fb08..1af989023c6 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -200,6 +200,11 @@ static int part_erase (struct mtd_info *mtd, struct erase_info *instr)
return -EINVAL;
instr->addr += part->offset;
ret = part->master->erase(part->master, instr);
+ if (ret) {
+ if (instr->fail_addr != 0xffffffff)
+ instr->fail_addr -= part->offset;
+ instr->addr -= part->offset;
+ }
return ret;
}
@@ -338,6 +343,7 @@ int add_mtd_partitions(struct mtd_info *master,
slave->mtd.size = parts[i].size;
slave->mtd.writesize = master->writesize;
slave->mtd.oobsize = master->oobsize;
+ slave->mtd.oobavail = master->oobavail;
slave->mtd.subpage_sft = master->subpage_sft;
slave->mtd.name = parts[i].name;
@@ -559,4 +565,3 @@ EXPORT_SYMBOL_GPL(deregister_mtd_parser);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Nicolas Pitre <nico@cam.org>");
MODULE_DESCRIPTION("Generic support for partitioning of MTD devices");
-