Lines Matching refs:vblock

59 	struct vmu_block *vblock;  in ofs_to_block()  local
76 vblock = kmalloc(sizeof(struct vmu_block), GFP_KERNEL); in ofs_to_block()
77 if (!vblock) in ofs_to_block()
80 vblock->num = num; in ofs_to_block()
81 vblock->ofs = src_ofs % card->blocklen; in ofs_to_block()
82 return vblock; in ofs_to_block()
305 struct vmu_block *vblock; in vmu_flash_read_char() local
325 vblock = ofs_to_block(ofs, mtd, partition); in vmu_flash_read_char()
326 if (!vblock) { in vmu_flash_read_char()
332 error = maple_vmu_read_block(vblock->num, buf, mtd); in vmu_flash_read_char()
339 ret = buf[vblock->ofs]; in vmu_flash_read_char()
342 kfree(vblock); in vmu_flash_read_char()
357 struct vmu_block *vblock; in vmu_flash_read() local
374 vblock = ofs_to_block(from + index, mtd, partition); in vmu_flash_read()
375 if (!vblock) in vmu_flash_read()
380 (pcache->block == vblock->num)) { in vmu_flash_read()
382 leftover = card->blocklen - vblock->ofs; in vmu_flash_read()
383 if (vblock->ofs + len - index < card->blocklen) { in vmu_flash_read()
386 pcache->buffer + vblock->ofs, in vmu_flash_read()
392 vblock->ofs, leftover); in vmu_flash_read()
403 kfree(vblock); in vmu_flash_read()
409 kfree(vblock); in vmu_flash_read()
424 struct vmu_block *vblock; in vmu_flash_write() local
440 vblock = ofs_to_block(to, mtd, partition); in vmu_flash_write()
441 if (!vblock) { in vmu_flash_write()
454 error = maple_vmu_read_block(vblock->num, buffer, mtd); in vmu_flash_write()
459 buffer[vblock->ofs] = buf[index]; in vmu_flash_write()
460 vblock->ofs++; in vmu_flash_write()
464 } while (vblock->ofs < card->blocklen); in vmu_flash_write()
467 error = maple_vmu_write_block(vblock->num, buffer, mtd); in vmu_flash_write()
475 vblock->num++; in vmu_flash_write()
476 vblock->ofs = 0; in vmu_flash_write()
481 kfree(vblock); in vmu_flash_write()
487 kfree(vblock); in vmu_flash_write()