Skip to contentSkip to conversation

mtdoops: Fix a bug where block may not be erased

PATCH New Richard Purdie 1 participant 1 message Jul 26, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 mtdoops: Fix a bug where block may not be erased

This makes the driver erase a block when it doesn't find any existing saved log messages which is safer than assuming the flash was already erased.

---
 drivers/mtd/mtdoops.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/mtd/mtdoops.c +1 -3
index 6f6b2f3..aebb3b2 100644
@@ -258,9 +258,7 @@ static void find_next_position(struct mtdoops_context *cxt)
 	if (maxcount == 0xffffffff) {
 		cxt->nextpage = 0;
 		cxt->nextcount = 1;
-		cxt->ready = 1;
-		printk(KERN_DEBUG "mtdoops: Ready %d, %d (first init)\n",
-				cxt->nextpage, cxt->nextcount);
+		schedule_work(&cxt->work_erase);
 		return;
 	}
 
Signature · 1 line
1.5.4.4