summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/misc.c
diff options
context:
space:
mode:
authorTanya Brokhman <tlinder@codeaurora.org>2014-10-20 19:57:00 +0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-11-07 12:08:51 +0200
commit326087033108e7806e24974f2c8271f95cddaf3a (patch)
tree3da326fd5be824e035f2ffcbddb896892e070039 /drivers/mtd/ubi/misc.c
parent789c89935cef776ab5e8b8c5120d9c29a88ab40e (diff)
downloadblackbird-op-linux-326087033108e7806e24974f2c8271f95cddaf3a.tar.gz
blackbird-op-linux-326087033108e7806e24974f2c8271f95cddaf3a.zip
UBI: Extend UBI layer debug/messaging capabilities
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Amended a bit by Artem. Signed-off-by: Tanya Brokhman <tlinder@codeaurora.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/misc.c')
-rw-r--r--drivers/mtd/ubi/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index f913d701a5b3..dbda77e556cb 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -111,7 +111,7 @@ void ubi_update_reserved(struct ubi_device *ubi)
ubi->avail_pebs -= need;
ubi->rsvd_pebs += need;
ubi->beb_rsvd_pebs += need;
- ubi_msg("reserved more %d PEBs for bad PEB handling", need);
+ ubi_msg(ubi, "reserved more %d PEBs for bad PEB handling", need);
}
/**
@@ -128,7 +128,7 @@ void ubi_calculate_reserved(struct ubi_device *ubi)
ubi->beb_rsvd_level = ubi->bad_peb_limit - ubi->bad_peb_count;
if (ubi->beb_rsvd_level < 0) {
ubi->beb_rsvd_level = 0;
- ubi_warn("number of bad PEBs (%d) is above the expected limit (%d), not reserving any PEBs for bad PEB handling, will use available PEBs (if any)",
+ ubi_warn(ubi, "number of bad PEBs (%d) is above the expected limit (%d), not reserving any PEBs for bad PEB handling, will use available PEBs (if any)",
ubi->bad_peb_count, ubi->bad_peb_limit);
}
}
OpenPOWER on IntegriCloud