Lines Matching refs:instr
206 static int part_erase(struct mtd_info *mtd, struct erase_info *instr) in part_erase() argument
212 if (instr->addr >= mtd->size) in part_erase()
214 instr->addr += part->offset; in part_erase()
215 ret = part->master->erase(part->master, instr); in part_erase()
217 if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) in part_erase()
218 instr->fail_addr -= part->offset; in part_erase()
219 instr->addr -= part->offset; in part_erase()
224 void mtd_erase_callback(struct erase_info *instr) in mtd_erase_callback() argument
226 if (instr->mtd->erase == part_erase) { in mtd_erase_callback()
227 struct mtd_part *part = PART(instr->mtd); in mtd_erase_callback()
229 if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) in mtd_erase_callback()
230 instr->fail_addr -= part->offset; in mtd_erase_callback()
231 instr->addr -= part->offset; in mtd_erase_callback()
233 if (instr->callback) in mtd_erase_callback()
234 instr->callback(instr); in mtd_erase_callback()