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/inftlmount.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/inftlmount.c')
-rw-r--r-- | drivers/mtd/inftlmount.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c index 0d946f10a682..9bfbca5d88d6 100644 --- a/drivers/mtd/inftlmount.c +++ b/drivers/mtd/inftlmount.c | |||
@@ -73,8 +73,8 @@ static int find_boot_record(struct INFTLrecord *inftl) | |||
73 | * Check for BNAND header first. Then whinge if it's found | 73 | * Check for BNAND header first. Then whinge if it's found |
74 | * but later checks fail. | 74 | * but later checks fail. |
75 | */ | 75 | */ |
76 | ret = mtd->read(mtd, block * inftl->EraseSize, | 76 | ret = mtd_read(mtd, block * inftl->EraseSize, SECTORSIZE, |
77 | SECTORSIZE, &retlen, buf); | 77 | &retlen, buf); |
78 | /* We ignore ret in case the ECC of the MediaHeader is invalid | 78 | /* We ignore ret in case the ECC of the MediaHeader is invalid |
79 | (which is apparently acceptable) */ | 79 | (which is apparently acceptable) */ |
80 | if (retlen != SECTORSIZE) { | 80 | if (retlen != SECTORSIZE) { |
@@ -118,8 +118,8 @@ static int find_boot_record(struct INFTLrecord *inftl) | |||
118 | memcpy(mh, buf, sizeof(struct INFTLMediaHeader)); | 118 | memcpy(mh, buf, sizeof(struct INFTLMediaHeader)); |
119 | 119 | ||
120 | /* Read the spare media header at offset 4096 */ | 120 | /* Read the spare media header at offset 4096 */ |
121 | mtd->read(mtd, block * inftl->EraseSize + 4096, | 121 | mtd_read(mtd, block * inftl->EraseSize + 4096, SECTORSIZE, |
122 | SECTORSIZE, &retlen, buf); | 122 | &retlen, buf); |
123 | if (retlen != SECTORSIZE) { | 123 | if (retlen != SECTORSIZE) { |
124 | printk(KERN_WARNING "INFTL: Unable to read spare " | 124 | printk(KERN_WARNING "INFTL: Unable to read spare " |
125 | "Media Header\n"); | 125 | "Media Header\n"); |
@@ -342,7 +342,7 @@ static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address, | |||
342 | int i; | 342 | int i; |
343 | 343 | ||
344 | for (i = 0; i < len; i += SECTORSIZE) { | 344 | for (i = 0; i < len; i += SECTORSIZE) { |
345 | if (mtd->read(mtd, address, SECTORSIZE, &retlen, buf)) | 345 | if (mtd_read(mtd, address, SECTORSIZE, &retlen, buf)) |
346 | return -1; | 346 | return -1; |
347 | if (memcmpb(buf, 0xff, SECTORSIZE) != 0) | 347 | if (memcmpb(buf, 0xff, SECTORSIZE) != 0) |
348 | return -1; | 348 | return -1; |