summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/debug.h
diff options
context:
space:
mode:
authorEzequiel Garcia <elezegarcia@gmail.com>2012-11-28 09:18:29 -0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-12-10 13:38:59 +0200
commit64575574f26d7969713ede9bde750c979da4037e (patch)
tree37877fedba9902b5717f030682f76b9367ba92c6 /drivers/mtd/ubi/debug.h
parentd856c13c11d81dfa545f927db8d31663d45bbc94 (diff)
UBI: introduce helpers dbg_chk_{io, gen}
With this patch code is a bit more readable and there's no generated code or functionality impact. Furthermore, this abstracts implementation details and will allow to change ubi_debug_info in a less invasive way. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/debug.h')
-rw-r--r--drivers/mtd/ubi/debug.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 3dbc877d9663..0add8d8a1672 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -158,4 +158,13 @@ static inline int ubi_dbg_is_erase_failure(const struct ubi_device *ubi)
return 0;
}
+static inline int ubi_dbg_chk_io(const struct ubi_device *ubi)
+{
+ return ubi->dbg->chk_io;
+}
+
+static inline int ubi_dbg_chk_gen(const struct ubi_device *ubi)
+{
+ return ubi->dbg->chk_gen;
+}
#endif /* !__UBI_DEBUG_H__ */