summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/kapi.c
diff options
context:
space:
mode:
authorTanya Brokhman <tlinder@codeaurora.org>2016-05-27 09:44:00 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-27 12:30:27 +0200
commit379c86f1afb2a11fd8b47534cf7148cf536c8632 (patch)
tree75a4836ab8779ec1b6fa0c5ca2e4947a963dbe3b /drivers/mtd/ubi/kapi.c
parentfbc46098bab8920ae6af9e0fa6c2e3a230b69639 (diff)
downloadbarebox-379c86f1afb2a11fd8b47534cf7148cf536c8632.tar.gz
barebox-379c86f1afb2a11fd8b47534cf7148cf536c8632.tar.xz
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> Conflicts: drivers/mtd/ubi/block.c drivers/mtd/ubi/build.c drivers/mtd/ubi/cdev.c drivers/mtd/ubi/debug.c drivers/mtd/ubi/fastmap.c drivers/mtd/ubi/io.c drivers/mtd/ubi/ubi.h drivers/mtd/ubi/vmt.c drivers/mtd/ubi/wl.c Reworked it for barebox. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/ubi/kapi.c')
-rw-r--r--drivers/mtd/ubi/kapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 7fc1aa8d70..60128a5c26 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -188,7 +188,7 @@ struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode)
return ERR_PTR(err);
}
if (err == 1) {
- ubi_warn("volume %d on UBI device %d is corrupted",
+ ubi_warn(ubi, "volume %d on UBI device %d is corrupted",
vol_id, ubi->ubi_num);
vol->corrupted = 1;
}
@@ -201,7 +201,7 @@ out_unlock:
kfree(desc);
out_put_ubi:
ubi_put_device(ubi);
- ubi_err("cannot open device %d, volume %d, error %d",
+ ubi_err(ubi, "cannot open device %d, volume %d, error %d",
ubi_num, vol_id, err);
return ERR_PTR(err);
}
@@ -365,7 +365,7 @@ int ubi_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
err = ubi_eba_read_leb(ubi, vol, lnum, buf, offset, len, check);
if (err && mtd_is_eccerr(err) && vol->vol_type == UBI_STATIC_VOLUME) {
- ubi_warn("mark volume %d as corrupted", vol_id);
+ ubi_warn(ubi, "mark volume %d as corrupted", vol_id);
vol->corrupted = 1;
}