diff options
author | Max Krummenacher <max.oss.09@gmail.com> | 2016-05-30 16:28:28 +0200 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-06-03 20:29:05 -0500 |
commit | 667067faa18334f1e28c01b47530b5cce1b6182f (patch) | |
tree | 5490fbeddf0146ea039beb60245ffb2294247474 /drivers | |
parent | ceee07b65875bb01bef55cba06940ef7afc1afba (diff) | |
download | u-boot-667067faa18334f1e28c01b47530b5cce1b6182f.tar.gz u-boot-667067faa18334f1e28c01b47530b5cce1b6182f.tar.xz u-boot-667067faa18334f1e28c01b47530b5cce1b6182f.zip |
nand: fix nand torture to use changed mtd api
The mtd subsystem deprecated and renamed the direct use of the mtd_info
struct's functionpointers. Instead the corresponding mtd_xxx function
should be used.
See also:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3c3c10bba1e4ccb75b41442e45c1a072f6cded19
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/nand_util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index 9b61087e86..5bba66a728 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -847,7 +847,7 @@ int nand_torture(struct mtd_info *mtd, loff_t offset) } for (i = 0; i < patt_count; i++) { - err = mtd->erase(mtd, &instr); + err = mtd_erase(mtd, &instr); if (err) { printf("%s: erase() failed for block at 0x%llx: %d\n", mtd->name, instr.addr, err); @@ -855,7 +855,7 @@ int nand_torture(struct mtd_info *mtd, loff_t offset) } /* Make sure the block contains only 0xff bytes */ - err = mtd->read(mtd, offset, mtd->erasesize, &retlen, buf); + err = mtd_read(mtd, offset, mtd->erasesize, &retlen, buf); if ((err && err != -EUCLEAN) || retlen != mtd->erasesize) { printf("%s: read() failed for block at 0x%llx: %d\n", mtd->name, instr.addr, err); @@ -872,14 +872,14 @@ int nand_torture(struct mtd_info *mtd, loff_t offset) /* Write a pattern and check it */ memset(buf, patterns[i], mtd->erasesize); - err = mtd->write(mtd, offset, mtd->erasesize, &retlen, buf); + err = mtd_write(mtd, offset, mtd->erasesize, &retlen, buf); if (err || retlen != mtd->erasesize) { printf("%s: write() failed for block at 0x%llx: %d\n", mtd->name, instr.addr, err); goto out; } - err = mtd->read(mtd, offset, mtd->erasesize, &retlen, buf); + err = mtd_read(mtd, offset, mtd->erasesize, &retlen, buf); if ((err && err != -EUCLEAN) || retlen != mtd->erasesize) { printf("%s: read() failed for block at 0x%llx: %d\n", mtd->name, instr.addr, err); |