mtd: introduce mtd_write interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:

committed by
David Woodhouse

parent
329ad399a9
commit
eda95cbf75
@@ -102,7 +102,7 @@ static int erase_write (struct mtd_info *mtd, unsigned long pos,
|
||||
* Next, write the data to flash.
|
||||
*/
|
||||
|
||||
ret = mtd->write(mtd, pos, len, &retlen, buf);
|
||||
ret = mtd_write(mtd, pos, len, &retlen, buf);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (retlen != len)
|
||||
@@ -152,7 +152,7 @@ static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos,
|
||||
mtd->name, pos, len);
|
||||
|
||||
if (!sect_size)
|
||||
return mtd->write(mtd, pos, len, &retlen, buf);
|
||||
return mtd_write(mtd, pos, len, &retlen, buf);
|
||||
|
||||
while (len > 0) {
|
||||
unsigned long sect_start = (pos/sect_size)*sect_size;
|
||||
|
Reference in New Issue
Block a user