Lines Matching refs:mtd
50 struct mtd_info *mtd; member
59 struct mtd_info *mtd, int partition) in ofs_to_block() argument
67 mpart = mtd->priv; in ofs_to_block()
112 struct mtd_info *mtd) in maple_vmu_read_block() argument
122 mpart = mtd->priv; in maple_vmu_read_block()
229 struct mtd_info *mtd) in maple_vmu_write_block() argument
237 mpart = mtd->priv; in maple_vmu_write_block()
305 struct mtd_info *mtd) in vmu_flash_read_char() argument
314 mpart = mtd->priv; in vmu_flash_read_char()
327 vblock = ofs_to_block(ofs, mtd, partition); in vmu_flash_read_char()
334 error = maple_vmu_read_block(vblock->num, buf, mtd); in vmu_flash_read_char()
352 static int vmu_flash_read(struct mtd_info *mtd, loff_t from, size_t len, in vmu_flash_read() argument
363 mpart = mtd->priv; in vmu_flash_read()
376 vblock = ofs_to_block(from + index, mtd, partition); in vmu_flash_read()
402 cx = vmu_flash_read_char(from + index, &retval, mtd); in vmu_flash_read()
418 static int vmu_flash_write(struct mtd_info *mtd, loff_t to, size_t len, in vmu_flash_write() argument
429 mpart = mtd->priv; in vmu_flash_write()
442 vblock = ofs_to_block(to, mtd, partition); in vmu_flash_write()
456 error = maple_vmu_read_block(vblock->num, buffer, mtd); in vmu_flash_write()
469 error = maple_vmu_write_block(vblock->num, buffer, mtd); in vmu_flash_write()
495 static void vmu_flash_sync(struct mtd_info *mtd) in vmu_flash_sync() argument
533 mtd_cur = &card->mtd[card->partition]; in vmu_queryblocks()
588 kfree(((card->mtd)[error]).priv); in vmu_queryblocks()
589 ((card->mtd)[error]).priv = NULL; in vmu_queryblocks()
639 card->mtd = kmalloc(sizeof(struct mtd_info) * card->partitions, in vmu_connect()
641 if (!card->mtd) { in vmu_connect()
684 kfree(card->mtd); in vmu_connect()
702 mpart = ((card->mtd)[x]).priv; in vmu_disconnect()
704 mtd_device_unregister(&((card->mtd)[x])); in vmu_disconnect()
708 kfree(card->mtd); in vmu_disconnect()
719 struct mtd_info *mtd; in vmu_can_unload() local
723 mtd = &((card->mtd)[x]); in vmu_can_unload()
724 if (mtd->usecount > 0) in vmu_can_unload()