summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-11-19 17:05:36 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-02-06 19:18:58 +0200
commit7950d023c562823345892aac2e7c6a49f8de9ad1 (patch)
treeb1482e3a88c69742a2b39ecba7a71e471a105a57 /drivers
parent276832d878d8a892ac7b40fd0ee07fe757e080c7 (diff)
UBI: use raw mtd read function in debugging code
This change affects only the debugging code. Namely, use mtd->read() function instead of ubi_io_read() to avoid bit-flips injection (ubi_dbg_is_bitflip()) which we do not want on the debugging path. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/ubi/io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index 339a74f11c0..6f90a653014 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -1325,10 +1325,12 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum,
int offset, int len)
{
int err, i;
+ size_t read;
+ loff_t addr = (loff_t)pnum * ubi->peb_size + offset;
mutex_lock(&ubi->dbg_buf_mutex);
- err = ubi_io_read(ubi, ubi->dbg_peb_buf, pnum, offset, len);
- if (err)
+ err = ubi->mtd->read(ubi->mtd, addr, len, &read, ubi->dbg_peb_buf);
+ if (err && err != -EUCLEAN)
goto out_unlock;
for (i = 0; i < len; i++) {