diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-11-19 10:05:36 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-02-06 12:18:58 -0500 |
commit | 7950d023c562823345892aac2e7c6a49f8de9ad1 (patch) | |
tree | b1482e3a88c69742a2b39ecba7a71e471a105a57 /drivers/mtd/ubi | |
parent | 276832d878d8a892ac7b40fd0ee07fe757e080c7 (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/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 339a74f11c0b..6f90a6530149 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, | |||
1325 | int offset, int len) | 1325 | int offset, int len) |
1326 | { | 1326 | { |
1327 | int err, i; | 1327 | int err, i; |
1328 | size_t read; | ||
1329 | loff_t addr = (loff_t)pnum * ubi->peb_size + offset; | ||
1328 | 1330 | ||
1329 | mutex_lock(&ubi->dbg_buf_mutex); | 1331 | mutex_lock(&ubi->dbg_buf_mutex); |
1330 | err = ubi_io_read(ubi, ubi->dbg_peb_buf, pnum, offset, len); | 1332 | err = ubi->mtd->read(ubi->mtd, addr, len, &read, ubi->dbg_peb_buf); |
1331 | if (err) | 1333 | if (err && err != -EUCLEAN) |
1332 | goto out_unlock; | 1334 | goto out_unlock; |
1333 | 1335 | ||
1334 | for (i = 0; i < len; i++) { | 1336 | for (i = 0; i < len; i++) { |