diff options
Diffstat (limited to 'drivers/mtd/ssfdc.c')
-rw-r--r-- | drivers/mtd/ssfdc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c index 976e3d28b962..ab2a52a039c3 100644 --- a/drivers/mtd/ssfdc.c +++ b/drivers/mtd/ssfdc.c | |||
@@ -122,9 +122,9 @@ static int get_valid_cis_sector(struct mtd_info *mtd) | |||
122 | * is not SSFDC formatted | 122 | * is not SSFDC formatted |
123 | */ | 123 | */ |
124 | for (k = 0, offset = 0; k < 4; k++, offset += mtd->erasesize) { | 124 | for (k = 0, offset = 0; k < 4; k++, offset += mtd->erasesize) { |
125 | if (!mtd->block_isbad(mtd, offset)) { | 125 | if (mtd_block_isbad(mtd, offset)) { |
126 | ret = mtd->read(mtd, offset, SECTOR_SIZE, &retlen, | 126 | ret = mtd_read(mtd, offset, SECTOR_SIZE, &retlen, |
127 | sect_buf); | 127 | sect_buf); |
128 | 128 | ||
129 | /* CIS pattern match on the sector buffer */ | 129 | /* CIS pattern match on the sector buffer */ |
130 | if (ret < 0 || retlen != SECTOR_SIZE) { | 130 | if (ret < 0 || retlen != SECTOR_SIZE) { |
@@ -156,7 +156,7 @@ static int read_physical_sector(struct mtd_info *mtd, uint8_t *sect_buf, | |||
156 | size_t retlen; | 156 | size_t retlen; |
157 | loff_t offset = (loff_t)sect_no << SECTOR_SHIFT; | 157 | loff_t offset = (loff_t)sect_no << SECTOR_SHIFT; |
158 | 158 | ||
159 | ret = mtd->read(mtd, offset, SECTOR_SIZE, &retlen, sect_buf); | 159 | ret = mtd_read(mtd, offset, SECTOR_SIZE, &retlen, sect_buf); |
160 | if (ret < 0 || retlen != SECTOR_SIZE) | 160 | if (ret < 0 || retlen != SECTOR_SIZE) |
161 | return -1; | 161 | return -1; |
162 | 162 | ||
@@ -175,7 +175,7 @@ static int read_raw_oob(struct mtd_info *mtd, loff_t offs, uint8_t *buf) | |||
175 | ops.oobbuf = buf; | 175 | ops.oobbuf = buf; |
176 | ops.datbuf = NULL; | 176 | ops.datbuf = NULL; |
177 | 177 | ||
178 | ret = mtd->read_oob(mtd, offs, &ops); | 178 | ret = mtd_read_oob(mtd, offs, &ops); |
179 | if (ret < 0 || ops.oobretlen != OOB_SIZE) | 179 | if (ret < 0 || ops.oobretlen != OOB_SIZE) |
180 | return -1; | 180 | return -1; |
181 | 181 | ||
@@ -255,7 +255,7 @@ static int build_logical_block_map(struct ssfdcr_record *ssfdc) | |||
255 | for (phys_block = ssfdc->cis_block + 1; phys_block < ssfdc->map_len; | 255 | for (phys_block = ssfdc->cis_block + 1; phys_block < ssfdc->map_len; |
256 | phys_block++) { | 256 | phys_block++) { |
257 | offset = (unsigned long)phys_block * ssfdc->erase_size; | 257 | offset = (unsigned long)phys_block * ssfdc->erase_size; |
258 | if (mtd->block_isbad(mtd, offset)) | 258 | if (mtd_block_isbad(mtd, offset)) |
259 | continue; /* skip bad blocks */ | 259 | continue; /* skip bad blocks */ |
260 | 260 | ||
261 | ret = read_raw_oob(mtd, offset, oob_buf); | 261 | ret = read_raw_oob(mtd, offset, oob_buf); |