Lines Matching refs:instr
361 static int flash_erase (struct mtd_info *mtd,struct erase_info *instr) in flash_erase() argument
367 printk (KERN_DEBUG "%s(addr = 0x%.8x, len = %d)\n", __func__, instr->addr, instr->len); in flash_erase()
379 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
388 if (i < 0 || (instr->addr & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
401 … for (; i < mtd->numeraseregions && instr->addr + instr->len >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
405 if (i < 0 || ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
408 addr = instr->addr; in flash_erase()
409 len = instr->len; in flash_erase()
418 instr->state = MTD_ERASE_FAILED; in flash_erase()
428 instr->state = MTD_ERASE_DONE; in flash_erase()
429 mtd_erase_callback(instr); in flash_erase()