diff options
author | Ezequiel Garcia <elezegarcia@gmail.com> | 2012-11-28 07:18:29 -0500 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-12-10 06:38:59 -0500 |
commit | 64575574f26d7969713ede9bde750c979da4037e (patch) | |
tree | 37877fedba9902b5717f030682f76b9367ba92c6 /drivers/mtd/ubi/attach.c | |
parent | d856c13c11d81dfa545f927db8d31663d45bbc94 (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/attach.c')
-rw-r--r-- | drivers/mtd/ubi/attach.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 72fed3027304..c071d410488f 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c | |||
@@ -1448,7 +1448,7 @@ int ubi_attach(struct ubi_device *ubi, int force_scan) | |||
1448 | goto out_wl; | 1448 | goto out_wl; |
1449 | 1449 | ||
1450 | #ifdef CONFIG_MTD_UBI_FASTMAP | 1450 | #ifdef CONFIG_MTD_UBI_FASTMAP |
1451 | if (ubi->fm && ubi->dbg->chk_gen) { | 1451 | if (ubi->fm && ubi_dbg_chk_gen(ubi)) { |
1452 | struct ubi_attach_info *scan_ai; | 1452 | struct ubi_attach_info *scan_ai; |
1453 | 1453 | ||
1454 | scan_ai = alloc_ai("ubi_ckh_aeb_slab_cache"); | 1454 | scan_ai = alloc_ai("ubi_ckh_aeb_slab_cache"); |
@@ -1498,7 +1498,7 @@ static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai) | |||
1498 | struct ubi_ainf_peb *aeb, *last_aeb; | 1498 | struct ubi_ainf_peb *aeb, *last_aeb; |
1499 | uint8_t *buf; | 1499 | uint8_t *buf; |
1500 | 1500 | ||
1501 | if (!ubi->dbg->chk_gen) | 1501 | if (!ubi_dbg_chk_gen(ubi)) |
1502 | return 0; | 1502 | return 0; |
1503 | 1503 | ||
1504 | /* | 1504 | /* |