UBI: fix background thread define
Subsystems (2)
PATCH 1/1 UBI: fix background thread define
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 <[email protected]>
--- drivers/mtd/ubi/build.c | 2 +- drivers/mtd/ubi/debug.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/mtd/ubi/build.c +1 -1
@@ -266,7 +266,7 @@ static int attach_mtd_dev(const char *mtubi_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 ;
drivers/mtd/ubi/debug.h +4 -2
@@ -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, ...) ({})
Quoted 3 lines · Alexander Schmidt
This patch renames
DBG_ENABLE_BGTtoDBG_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.
Hi, applied, thanks.
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)