aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/vtbl.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2011-03-18 10:50:02 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2011-03-18 10:50:02 -0700
commitfd57ed021990157ee5b3997c3f21c734093a9e23 (patch)
treea32d18647b1becc1ee81fb04c5dd5dedeed4e1d7 /drivers/mtd/ubi/vtbl.c
parentMAINTAINERS: Add serial (diff)
parentUBI: make tests modes dynamic (diff)
downloadlinux-fd57ed021990157ee5b3997c3f21c734093a9e23.tar.gz
linux-fd57ed021990157ee5b3997c3f21c734093a9e23.tar.bz2
linux-fd57ed021990157ee5b3997c3f21c734093a9e23.zip
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
* 'linux-next' of git://git.infradead.org/ubi-2.6: UBI: make tests modes dynamic UBI: make self-checks dynamic UBI: make debugging messages dynamic UBI: remove UBI_IO_DEBUG macro UBI: kill debugging buffer UBI: allocate erase checking buffer on demand UBI: allocate write checking buffer on demand UBI: always re-read in case of read failures UBI: cleanup comments about corrupted PEBs UBI: add slab cache for ubi_scan_leb objects UBI: use raw mtd read function in debugging code UBI: try to reveal buggy MTD drivers UBI: add a commentary about allocating VID header buffer on stack UBI: cleanup LEB start calculations UBI: fix NOR erase preparation quirk
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r--drivers/mtd/ubi/vtbl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 0b8141fc5c26..fd3bf770f518 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -62,7 +62,7 @@
#include <asm/div64.h>
#include "ubi.h"
-#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
+#ifdef CONFIG_MTD_UBI_DEBUG
static void paranoid_vtbl_check(const struct ubi_device *ubi);
#else
#define paranoid_vtbl_check(ubi)
@@ -868,7 +868,7 @@ out_free:
return err;
}
-#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
+#ifdef CONFIG_MTD_UBI_DEBUG
/**
* paranoid_vtbl_check - check volume table.
@@ -876,10 +876,13 @@ out_free:
*/
static void paranoid_vtbl_check(const struct ubi_device *ubi)
{
+ if (!(ubi_chk_flags & UBI_CHK_GEN))
+ return;
+
if (vtbl_check(ubi, ubi->vtbl)) {
ubi_err("paranoid check failed");
BUG();
}
}
-#endif /* CONFIG_MTD_UBI_DEBUG_PARANOID */
+#endif /* CONFIG_MTD_UBI_DEBUG */