提交 43b5693d 编写于 作者: R Richard Purdie 提交者: David Woodhouse

[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: NRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 f0482ee3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册