aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_subpagetest.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-23 10:30:16 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:25:19 -0500
commit329ad399a9b3adf52c90637b21ca029fcf7f8795 (patch)
tree7aa7bb2609c25de7859c3a666f3ea90934609592 /drivers/mtd/tests/mtd_subpagetest.c
parent04c601bfa4cb29c968dcb66e44c799c9c01d8675 (diff)
mtd: introduce mtd_read interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/tests/mtd_subpagetest.c')
-rw-r--r--drivers/mtd/tests/mtd_subpagetest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c
index 16d0c05024d7..d81f89a19daa 100644
--- a/drivers/mtd/tests/mtd_subpagetest.c
+++ b/drivers/mtd/tests/mtd_subpagetest.c
@@ -196,7 +196,7 @@ static int verify_eraseblock(int ebnum)
196 set_random_data(writebuf, subpgsize); 196 set_random_data(writebuf, subpgsize);
197 clear_data(readbuf, subpgsize); 197 clear_data(readbuf, subpgsize);
198 read = 0; 198 read = 0;
199 err = mtd->read(mtd, addr, subpgsize, &read, readbuf); 199 err = mtd_read(mtd, addr, subpgsize, &read, readbuf);
200 if (unlikely(err || read != subpgsize)) { 200 if (unlikely(err || read != subpgsize)) {
201 if (mtd_is_bitflip(err) && read == subpgsize) { 201 if (mtd_is_bitflip(err) && read == subpgsize) {
202 printk(PRINT_PREF "ECC correction at %#llx\n", 202 printk(PRINT_PREF "ECC correction at %#llx\n",
@@ -224,7 +224,7 @@ static int verify_eraseblock(int ebnum)
224 set_random_data(writebuf, subpgsize); 224 set_random_data(writebuf, subpgsize);
225 clear_data(readbuf, subpgsize); 225 clear_data(readbuf, subpgsize);
226 read = 0; 226 read = 0;
227 err = mtd->read(mtd, addr, subpgsize, &read, readbuf); 227 err = mtd_read(mtd, addr, subpgsize, &read, readbuf);
228 if (unlikely(err || read != subpgsize)) { 228 if (unlikely(err || read != subpgsize)) {
229 if (mtd_is_bitflip(err) && read == subpgsize) { 229 if (mtd_is_bitflip(err) && read == subpgsize) {
230 printk(PRINT_PREF "ECC correction at %#llx\n", 230 printk(PRINT_PREF "ECC correction at %#llx\n",
@@ -262,7 +262,7 @@ static int verify_eraseblock2(int ebnum)
262 set_random_data(writebuf, subpgsize * k); 262 set_random_data(writebuf, subpgsize * k);
263 clear_data(readbuf, subpgsize * k); 263 clear_data(readbuf, subpgsize * k);
264 read = 0; 264 read = 0;
265 err = mtd->read(mtd, addr, subpgsize * k, &read, readbuf); 265 err = mtd_read(mtd, addr, subpgsize * k, &read, readbuf);
266 if (unlikely(err || read != subpgsize * k)) { 266 if (unlikely(err || read != subpgsize * k)) {
267 if (mtd_is_bitflip(err) && read == subpgsize * k) { 267 if (mtd_is_bitflip(err) && read == subpgsize * k) {
268 printk(PRINT_PREF "ECC correction at %#llx\n", 268 printk(PRINT_PREF "ECC correction at %#llx\n",
@@ -296,7 +296,7 @@ static int verify_eraseblock_ff(int ebnum)
296 for (j = 0; j < mtd->erasesize / subpgsize; ++j) { 296 for (j = 0; j < mtd->erasesize / subpgsize; ++j) {
297 clear_data(readbuf, subpgsize); 297 clear_data(readbuf, subpgsize);
298 read = 0; 298 read = 0;
299 err = mtd->read(mtd, addr, subpgsize, &read, readbuf); 299 err = mtd_read(mtd, addr, subpgsize, &read, readbuf);
300 if (unlikely(err || read != subpgsize)) { 300 if (unlikely(err || read != subpgsize)) {
301 if (mtd_is_bitflip(err) && read == subpgsize) { 301 if (mtd_is_bitflip(err) && read == subpgsize) {
302 printk(PRINT_PREF "ECC correction at %#llx\n", 302 printk(PRINT_PREF "ECC correction at %#llx\n",