diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-07-26 10:25:18 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-18 12:51:48 +0200 |
commit | 43b5693d404127697d62962def8c1bfe3a89811a (patch) | |
tree | e671dbb20fb4bd50d8bb994aabbfe0459729176b /drivers/mtd/mtdoops.c | |
parent | [MTD] mtdoops: Add a magic number to logged kernel oops (diff) | |
download | linux-43b5693d404127697d62962def8c1bfe3a89811a.tar.xz linux-43b5693d404127697d62962def8c1bfe3a89811a.zip |
[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>
Diffstat (limited to 'drivers/mtd/mtdoops.c')
-rw-r--r-- | drivers/mtd/mtdoops.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c index 6f6b2f3c70df..aebb3b27edbd 100644 --- a/drivers/mtd/mtdoops.c +++ b/drivers/mtd/mtdoops.c @@ -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; } |