Lines Matching refs:vblock

61 	struct vmu_block *vblock;  in ofs_to_block()  local
78 vblock = kmalloc(sizeof(struct vmu_block), GFP_KERNEL); in ofs_to_block()
79 if (!vblock) in ofs_to_block()
82 vblock->num = num; in ofs_to_block()
83 vblock->ofs = src_ofs % card->blocklen; in ofs_to_block()
84 return vblock; in ofs_to_block()
307 struct vmu_block *vblock; in vmu_flash_read_char() local
327 vblock = ofs_to_block(ofs, mtd, partition); in vmu_flash_read_char()
328 if (!vblock) { in vmu_flash_read_char()
334 error = maple_vmu_read_block(vblock->num, buf, mtd); in vmu_flash_read_char()
341 ret = buf[vblock->ofs]; in vmu_flash_read_char()
344 kfree(vblock); in vmu_flash_read_char()
359 struct vmu_block *vblock; in vmu_flash_read() local
376 vblock = ofs_to_block(from + index, mtd, partition); in vmu_flash_read()
377 if (!vblock) in vmu_flash_read()
382 (pcache->block == vblock->num)) { in vmu_flash_read()
384 leftover = card->blocklen - vblock->ofs; in vmu_flash_read()
385 if (vblock->ofs + len - index < card->blocklen) { in vmu_flash_read()
388 pcache->buffer + vblock->ofs, in vmu_flash_read()
394 vblock->ofs, leftover); in vmu_flash_read()
405 kfree(vblock); in vmu_flash_read()
411 kfree(vblock); in vmu_flash_read()
426 struct vmu_block *vblock; in vmu_flash_write() local
442 vblock = ofs_to_block(to, mtd, partition); in vmu_flash_write()
443 if (!vblock) { in vmu_flash_write()
456 error = maple_vmu_read_block(vblock->num, buffer, mtd); in vmu_flash_write()
461 buffer[vblock->ofs] = buf[index]; in vmu_flash_write()
462 vblock->ofs++; in vmu_flash_write()
466 } while (vblock->ofs < card->blocklen); in vmu_flash_write()
469 error = maple_vmu_write_block(vblock->num, buffer, mtd); in vmu_flash_write()
477 vblock->num++; in vmu_flash_write()
478 vblock->ofs = 0; in vmu_flash_write()
483 kfree(vblock); in vmu_flash_write()
489 kfree(vblock); in vmu_flash_write()