[PATCH] [MTD] UBI: fix background thread define
Alexander Schmidt
alexs at linux.vnet.ibm.com
Tue Feb 27 08:34:28 EST 2007
Hi Artem,
This patch renames DBG_ENABLE_BGT to DBG_DISABLE_BGT, which makes it more
obvious that the background thread should be enabled by default. The name
corresponds to the kernel config option now.
I also fixed the semantics on intialisation (bgt now gets enabled when
DBG_DISABLE_BGT == 0), and compilation with debugging disabled works again.
Signed-off-by: Alexander Schmidt <alexs at linux.vnet.ibm.com>
---
drivers/mtd/ubi/build.c | 2 +-
drivers/mtd/ubi/debug.h | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
--- dedekind-ubi-2.6.orig/drivers/mtd/ubi/build.c
+++ dedekind-ubi-2.6/drivers/mtd/ubi/build.c
@@ -266,7 +266,7 @@ static int attach_mtd_dev(const char *mt
ubi_msg("number of PEBs reserved for bad PEB handling: %d",
ubi->beb.reserved_pebs);
- if (!DBG_ENABLE_BGT && !ubi->io.ro_mode)
+ if (!DBG_DISABLE_BGT && !ubi->io.ro_mode)
ubi_bgt_enable(ubi);
return 0;
--- dedekind-ubi-2.6.orig/drivers/mtd/ubi/debug.h
+++ dedekind-ubi-2.6/drivers/mtd/ubi/debug.h
@@ -30,9 +30,9 @@
#ifdef CONFIG_MTD_UBI_DEBUG
#ifdef CONFIG_MTD_UBI_DEBUG_DISABLE_BGT
-#define DBG_ENABLE_BGT 0
+#define DBG_DISABLE_BGT 1
#else
-#define DBG_ENABLE_BGT 1
+#define DBG_DISABLE_BGT 0
#endif
#define UBI_DEBUG 1
@@ -142,6 +142,8 @@ void __exit ubi_dbg_close(void);
#define UBI_DEBUG 0
+#define DBG_DISABLE_BGT 0
+
#define ubi_assert(expr) ({})
#define dbg_err(fmt, ...) ({})
More information about the linux-mtd
mailing list