Revert "misc: apanic: erase kpanic when no data"
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:27:11 +0000 (22:27 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:27:11 +0000 (22:27 +0800)
This reverts commit b4c785a83a24830838f3293ff3e8ff5354509a66.

drivers/misc/apanic.c

index ca875f89da7a7ffe4dfde8eda532f26c800d50f9..f50881ba917d85c41c6d82ebb6574f1a1c23cc2d 100644 (file)
@@ -297,7 +297,6 @@ static void mtd_panic_notify_add(struct mtd_info *mtd)
        struct panic_header *hdr = ctx->bounce;
        size_t len;
        int rc;
-       int    proc_entry_created = 0;
 
        if (strcmp(mtd->name, CONFIG_APANIC_PLABEL))
                return;
@@ -359,7 +358,6 @@ static void mtd_panic_notify_add(struct mtd_info *mtd)
                        ctx->apanic_console->write_proc = apanic_proc_write;
                        ctx->apanic_console->size = hdr->console_length;
                        ctx->apanic_console->data = (void *) 1;
-                       proc_entry_created = 1;
                }
        }
 
@@ -374,13 +372,9 @@ static void mtd_panic_notify_add(struct mtd_info *mtd)
                        ctx->apanic_threads->write_proc = apanic_proc_write;
                        ctx->apanic_threads->size = hdr->threads_length;
                        ctx->apanic_threads->data = (void *) 2;
-                       proc_entry_created = 1;
                }
        }
 
-       if (!proc_entry_created)
-               mtd_panic_erase();
-
        return;
 out_err:
        ctx->mtd = NULL;