diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-23 11:29:55 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:25:24 -0500 |
commit | a2cc5ba075f9bc837d0b4d4ec7328dcefc11859d (patch) | |
tree | a5f2c88ddd21028247bfaf02ca336dd501ed3a5f /drivers/mtd/tests | |
parent | fd2819bbc92fc98bed5d612e4acbe16b6326f6bf (diff) |
mtd: introduce mtd_write_oob 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')
-rw-r--r-- | drivers/mtd/tests/mtd_oobtest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/tests/mtd_oobtest.c b/drivers/mtd/tests/mtd_oobtest.c index 962d27a64e64..81113885e086 100644 --- a/drivers/mtd/tests/mtd_oobtest.c +++ b/drivers/mtd/tests/mtd_oobtest.c | |||
@@ -139,7 +139,7 @@ static int write_eraseblock(int ebnum) | |||
139 | ops.ooboffs = use_offset; | 139 | ops.ooboffs = use_offset; |
140 | ops.datbuf = NULL; | 140 | ops.datbuf = NULL; |
141 | ops.oobbuf = writebuf; | 141 | ops.oobbuf = writebuf; |
142 | err = mtd->write_oob(mtd, addr, &ops); | 142 | err = mtd_write_oob(mtd, addr, &ops); |
143 | if (err || ops.oobretlen != use_len) { | 143 | if (err || ops.oobretlen != use_len) { |
144 | printk(PRINT_PREF "error: writeoob failed at %#llx\n", | 144 | printk(PRINT_PREF "error: writeoob failed at %#llx\n", |
145 | (long long)addr); | 145 | (long long)addr); |
@@ -524,7 +524,7 @@ static int __init mtd_oobtest_init(void) | |||
524 | ops.oobbuf = writebuf; | 524 | ops.oobbuf = writebuf; |
525 | printk(PRINT_PREF "attempting to start write past end of OOB\n"); | 525 | printk(PRINT_PREF "attempting to start write past end of OOB\n"); |
526 | printk(PRINT_PREF "an error is expected...\n"); | 526 | printk(PRINT_PREF "an error is expected...\n"); |
527 | err = mtd->write_oob(mtd, addr0, &ops); | 527 | err = mtd_write_oob(mtd, addr0, &ops); |
528 | if (err) { | 528 | if (err) { |
529 | printk(PRINT_PREF "error occurred as expected\n"); | 529 | printk(PRINT_PREF "error occurred as expected\n"); |
530 | err = 0; | 530 | err = 0; |
@@ -568,7 +568,7 @@ static int __init mtd_oobtest_init(void) | |||
568 | ops.oobbuf = writebuf; | 568 | ops.oobbuf = writebuf; |
569 | printk(PRINT_PREF "attempting to write past end of device\n"); | 569 | printk(PRINT_PREF "attempting to write past end of device\n"); |
570 | printk(PRINT_PREF "an error is expected...\n"); | 570 | printk(PRINT_PREF "an error is expected...\n"); |
571 | err = mtd->write_oob(mtd, mtd->size - mtd->writesize, &ops); | 571 | err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); |
572 | if (err) { | 572 | if (err) { |
573 | printk(PRINT_PREF "error occurred as expected\n"); | 573 | printk(PRINT_PREF "error occurred as expected\n"); |
574 | err = 0; | 574 | err = 0; |
@@ -612,7 +612,7 @@ static int __init mtd_oobtest_init(void) | |||
612 | ops.oobbuf = writebuf; | 612 | ops.oobbuf = writebuf; |
613 | printk(PRINT_PREF "attempting to write past end of device\n"); | 613 | printk(PRINT_PREF "attempting to write past end of device\n"); |
614 | printk(PRINT_PREF "an error is expected...\n"); | 614 | printk(PRINT_PREF "an error is expected...\n"); |
615 | err = mtd->write_oob(mtd, mtd->size - mtd->writesize, &ops); | 615 | err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); |
616 | if (err) { | 616 | if (err) { |
617 | printk(PRINT_PREF "error occurred as expected\n"); | 617 | printk(PRINT_PREF "error occurred as expected\n"); |
618 | err = 0; | 618 | err = 0; |
@@ -670,7 +670,7 @@ static int __init mtd_oobtest_init(void) | |||
670 | ops.ooboffs = 0; | 670 | ops.ooboffs = 0; |
671 | ops.datbuf = NULL; | 671 | ops.datbuf = NULL; |
672 | ops.oobbuf = writebuf; | 672 | ops.oobbuf = writebuf; |
673 | err = mtd->write_oob(mtd, addr, &ops); | 673 | err = mtd_write_oob(mtd, addr, &ops); |
674 | if (err) | 674 | if (err) |
675 | goto out; | 675 | goto out; |
676 | if (i % 256 == 0) | 676 | if (i % 256 == 0) |