aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_speedtest.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-23 10:35:41 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:25:20 -0500
commiteda95cbf75193808f62948fb0142ba0901d8bee2 (patch)
tree047bcfa05bc118b1d34327b3e62fa1d10d4bcb43 /drivers/mtd/tests/mtd_speedtest.c
parent329ad399a9b3adf52c90637b21ca029fcf7f8795 (diff)
mtd: introduce mtd_write 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_speedtest.c')
-rw-r--r--drivers/mtd/tests/mtd_speedtest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/tests/mtd_speedtest.c b/drivers/mtd/tests/mtd_speedtest.c
index 3c9529bd0a62..c7b18e189082 100644
--- a/drivers/mtd/tests/mtd_speedtest.c
+++ b/drivers/mtd/tests/mtd_speedtest.c
@@ -143,7 +143,7 @@ static int write_eraseblock(int ebnum)
143 int err = 0; 143 int err = 0;
144 loff_t addr = ebnum * mtd->erasesize; 144 loff_t addr = ebnum * mtd->erasesize;
145 145
146 err = mtd->write(mtd, addr, mtd->erasesize, &written, iobuf); 146 err = mtd_write(mtd, addr, mtd->erasesize, &written, iobuf);
147 if (err || written != mtd->erasesize) { 147 if (err || written != mtd->erasesize) {
148 printk(PRINT_PREF "error: write failed at %#llx\n", addr); 148 printk(PRINT_PREF "error: write failed at %#llx\n", addr);
149 if (!err) 149 if (!err)
@@ -161,7 +161,7 @@ static int write_eraseblock_by_page(int ebnum)
161 void *buf = iobuf; 161 void *buf = iobuf;
162 162
163 for (i = 0; i < pgcnt; i++) { 163 for (i = 0; i < pgcnt; i++) {
164 err = mtd->write(mtd, addr, pgsize, &written, buf); 164 err = mtd_write(mtd, addr, pgsize, &written, buf);
165 if (err || written != pgsize) { 165 if (err || written != pgsize) {
166 printk(PRINT_PREF "error: write failed at %#llx\n", 166 printk(PRINT_PREF "error: write failed at %#llx\n",
167 addr); 167 addr);
@@ -184,7 +184,7 @@ static int write_eraseblock_by_2pages(int ebnum)
184 void *buf = iobuf; 184 void *buf = iobuf;
185 185
186 for (i = 0; i < n; i++) { 186 for (i = 0; i < n; i++) {
187 err = mtd->write(mtd, addr, sz, &written, buf); 187 err = mtd_write(mtd, addr, sz, &written, buf);
188 if (err || written != sz) { 188 if (err || written != sz) {
189 printk(PRINT_PREF "error: write failed at %#llx\n", 189 printk(PRINT_PREF "error: write failed at %#llx\n",
190 addr); 190 addr);
@@ -196,7 +196,7 @@ static int write_eraseblock_by_2pages(int ebnum)
196 buf += sz; 196 buf += sz;
197 } 197 }
198 if (pgcnt % 2) { 198 if (pgcnt % 2) {
199 err = mtd->write(mtd, addr, pgsize, &written, buf); 199 err = mtd_write(mtd, addr, pgsize, &written, buf);
200 if (err || written != pgsize) { 200 if (err || written != pgsize) {
201 printk(PRINT_PREF "error: write failed at %#llx\n", 201 printk(PRINT_PREF "error: write failed at %#llx\n",
202 addr); 202 addr);