diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-23 10:30:16 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:25:19 -0500 |
commit | 329ad399a9b3adf52c90637b21ca029fcf7f8795 (patch) | |
tree | 7aa7bb2609c25de7859c3a666f3ea90934609592 /drivers/mtd/nand/diskonchip.c | |
parent | 04c601bfa4cb29c968dcb66e44c799c9c01d8675 (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/nand/diskonchip.c')
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 5780dbab6113..df921e7a496c 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -1072,7 +1072,7 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch | |||
1072 | size_t retlen; | 1072 | size_t retlen; |
1073 | 1073 | ||
1074 | for (offs = 0; offs < mtd->size; offs += mtd->erasesize) { | 1074 | for (offs = 0; offs < mtd->size; offs += mtd->erasesize) { |
1075 | ret = mtd->read(mtd, offs, mtd->writesize, &retlen, buf); | 1075 | ret = mtd_read(mtd, offs, mtd->writesize, &retlen, buf); |
1076 | if (retlen != mtd->writesize) | 1076 | if (retlen != mtd->writesize) |
1077 | continue; | 1077 | continue; |
1078 | if (ret) { | 1078 | if (ret) { |
@@ -1097,7 +1097,7 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch | |||
1097 | /* Only one mediaheader was found. We want buf to contain a | 1097 | /* Only one mediaheader was found. We want buf to contain a |
1098 | mediaheader on return, so we'll have to re-read the one we found. */ | 1098 | mediaheader on return, so we'll have to re-read the one we found. */ |
1099 | offs = doc->mh0_page << this->page_shift; | 1099 | offs = doc->mh0_page << this->page_shift; |
1100 | ret = mtd->read(mtd, offs, mtd->writesize, &retlen, buf); | 1100 | ret = mtd_read(mtd, offs, mtd->writesize, &retlen, buf); |
1101 | if (retlen != mtd->writesize) { | 1101 | if (retlen != mtd->writesize) { |
1102 | /* Insanity. Give up. */ | 1102 | /* Insanity. Give up. */ |
1103 | printk(KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n"); | 1103 | printk(KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n"); |