Lines Matching refs:instr
366 static int flash_erase (struct mtd_info *mtd,struct erase_info *instr) in flash_erase() argument
372 printk (KERN_DEBUG "%s(addr = 0x%.8x, len = %d)\n", __func__, instr->addr, instr->len); in flash_erase()
376 if (instr->addr + instr->len > mtd->size) return (-EINVAL); in flash_erase()
387 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
396 if (instr->addr & (mtd->eraseregions[i].erasesize - 1)) return (-EINVAL); in flash_erase()
408 … for (; i < mtd->numeraseregions && instr->addr + instr->len >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
412 if ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1)) return (-EINVAL); in flash_erase()
414 addr = instr->addr; in flash_erase()
415 len = instr->len; in flash_erase()
424 instr->state = MTD_ERASE_FAILED; in flash_erase()
434 instr->state = MTD_ERASE_DONE; in flash_erase()
435 mtd_erase_callback(instr); in flash_erase()