diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-14 15:11:29 (GMT) |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-16 11:50:16 (GMT) |
commit | 6edb9793959fb547a15d5ffe6b142d9f0b3e41a6 (patch) | |
tree | 85ce150c27b728dbddcfbd303154c7e59c95e548 /drivers/mtd/ubi/build.c | |
parent | 332873d60b943c9bf53957c6e334038ac5e9dc6b (diff) | |
download | linux-6edb9793959fb547a15d5ffe6b142d9f0b3e41a6.tar.xz |
UBI: kill debugging buffer
This patch kills the 'ubi->dbg_peb_buf' debugging buffer and the
associated mutex, because all users of this buffer are now gone.
We are killing this buffer because we are going to switch to
dynamic debugging control, just like in UBIFS, which means that
CONFIG_MTD_UBI_DEBUG_PARANOID will be removed. In this case we'd
end up always allocating 'ubi->dbg_peb_buf', which is rather large
(128KiB or more), and this would be wasteful. Thus, we are just
killing it.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r-- | drivers/mtd/ubi/build.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index ec0ad19..3a04719 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -939,13 +939,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset) if (!ubi->peb_buf2) goto out_free; -#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID - mutex_init(&ubi->dbg_buf_mutex); - ubi->dbg_peb_buf = vmalloc(ubi->peb_size); - if (!ubi->dbg_peb_buf) - goto out_free; -#endif - err = attach_by_scanning(ubi); if (err) { dbg_err("failed to attach by scanning, error %d", err); @@ -1011,9 +1004,6 @@ out_detach: out_free: vfree(ubi->peb_buf1); vfree(ubi->peb_buf2); -#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID - vfree(ubi->dbg_peb_buf); -#endif if (ref) put_device(&ubi->dev); else @@ -1084,9 +1074,6 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway) put_mtd_device(ubi->mtd); vfree(ubi->peb_buf1); vfree(ubi->peb_buf2); -#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID - vfree(ubi->dbg_peb_buf); -#endif ubi_msg("mtd%d is detached from ubi%d", ubi->mtd->index, ubi->ubi_num); put_device(&ubi->dev); return 0; |