aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/wl.c
diff options
context:
space:
mode:
authorEzequiel Garcia <elezegarcia@gmail.com>2012-11-28 07:18:29 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-12-10 06:38:59 -0500
commit64575574f26d7969713ede9bde750c979da4037e (patch)
tree37877fedba9902b5717f030682f76b9367ba92c6 /drivers/mtd/ubi/wl.c
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/wl.c')
-rw-r--r--drivers/mtd/ubi/wl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index ae955174f6ef..c687538a8e3b 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -2043,7 +2043,7 @@ static int self_check_ec(struct ubi_device *ubi, int pnum, int ec)
2043 long long read_ec; 2043 long long read_ec;
2044 struct ubi_ec_hdr *ec_hdr; 2044 struct ubi_ec_hdr *ec_hdr;
2045 2045
2046 if (!ubi->dbg->chk_gen) 2046 if (!ubi_dbg_chk_gen(ubi))
2047 return 0; 2047 return 0;
2048 2048
2049 ec_hdr = kzalloc(ubi->ec_hdr_alsize, GFP_NOFS); 2049 ec_hdr = kzalloc(ubi->ec_hdr_alsize, GFP_NOFS);
@@ -2083,7 +2083,7 @@ out_free:
2083static int self_check_in_wl_tree(const struct ubi_device *ubi, 2083static int self_check_in_wl_tree(const struct ubi_device *ubi,
2084 struct ubi_wl_entry *e, struct rb_root *root) 2084 struct ubi_wl_entry *e, struct rb_root *root)
2085{ 2085{
2086 if (!ubi->dbg->chk_gen) 2086 if (!ubi_dbg_chk_gen(ubi))
2087 return 0; 2087 return 0;
2088 2088
2089 if (in_wl_tree(e, root)) 2089 if (in_wl_tree(e, root))
@@ -2109,7 +2109,7 @@ static int self_check_in_pq(const struct ubi_device *ubi,
2109 struct ubi_wl_entry *p; 2109 struct ubi_wl_entry *p;
2110 int i; 2110 int i;
2111 2111
2112 if (!ubi->dbg->chk_gen) 2112 if (!ubi_dbg_chk_gen(ubi))
2113 return 0; 2113 return 0;
2114 2114
2115 for (i = 0; i < UBI_PROT_QUEUE_LEN; ++i) 2115 for (i = 0; i < UBI_PROT_QUEUE_LEN; ++i)