Lines Matching defs:len
37 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len)
48 if (mtd_mod_by_eb(len, mtd)) {
58 if (check_offs_len(mtd, instr->addr, instr->len))
60 memset((char *)mtd->priv + instr->addr, 0xff, instr->len);
65 static int ram_point(struct mtd_info *mtd, loff_t from, size_t len,
69 *retlen = len;
78 len += page_ofs;
79 while (len > PAGE_SIZE) {
80 len -= PAGE_SIZE;
94 static int ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
99 static int ram_read(struct mtd_info *mtd, loff_t from, size_t len,
102 memcpy(buf, mtd->priv + from, len);
103 *retlen = len;
107 static int ram_write(struct mtd_info *mtd, loff_t to, size_t len,
110 memcpy((char *)mtd->priv + to, buf, len);
111 *retlen = len;