Explorar o código

[MTD] 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.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Richard Purdie %!s(int64=17) %!d(string=hai) anos
pai
achega
43b5693d40
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      drivers/mtd/mtdoops.c

+ 1 - 3
drivers/mtd/mtdoops.c

@@ -258,9 +258,7 @@ static void find_next_position(struct mtdoops_context *cxt)
 	if (maxcount == 0xffffffff) {
 	if (maxcount == 0xffffffff) {
 		cxt->nextpage = 0;
 		cxt->nextpage = 0;
 		cxt->nextcount = 1;
 		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;
 		return;
 	}
 	}