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/nand_bbt.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/nand_bbt.c')
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 69148ae3bf58..1bcd6bc6798c 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -201,7 +201,7 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, | |||
201 | from += marker_len; | 201 | from += marker_len; |
202 | marker_len = 0; | 202 | marker_len = 0; |
203 | } | 203 | } |
204 | res = mtd->read(mtd, from, len, &retlen, buf); | 204 | res = mtd_read(mtd, from, len, &retlen, buf); |
205 | if (res < 0) { | 205 | if (res < 0) { |
206 | if (mtd_is_eccerr(res)) { | 206 | if (mtd_is_eccerr(res)) { |
207 | pr_info("nand_bbt: ECC error in BBT at " | 207 | pr_info("nand_bbt: ECC error in BBT at " |
@@ -298,7 +298,7 @@ static int scan_read_raw_data(struct mtd_info *mtd, uint8_t *buf, loff_t offs, | |||
298 | if (td->options & NAND_BBT_VERSION) | 298 | if (td->options & NAND_BBT_VERSION) |
299 | len++; | 299 | len++; |
300 | 300 | ||
301 | return mtd->read(mtd, offs, len, &retlen, buf); | 301 | return mtd_read(mtd, offs, len, &retlen, buf); |
302 | } | 302 | } |
303 | 303 | ||
304 | /* Scan read raw data from flash */ | 304 | /* Scan read raw data from flash */ |
@@ -756,7 +756,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, | |||
756 | /* Make it block aligned */ | 756 | /* Make it block aligned */ |
757 | to &= ~((loff_t)((1 << this->bbt_erase_shift) - 1)); | 757 | to &= ~((loff_t)((1 << this->bbt_erase_shift) - 1)); |
758 | len = 1 << this->bbt_erase_shift; | 758 | len = 1 << this->bbt_erase_shift; |
759 | res = mtd->read(mtd, to, len, &retlen, buf); | 759 | res = mtd_read(mtd, to, len, &retlen, buf); |
760 | if (res < 0) { | 760 | if (res < 0) { |
761 | if (retlen != len) { | 761 | if (retlen != len) { |
762 | pr_info("nand_bbt: error reading block " | 762 | pr_info("nand_bbt: error reading block " |