Lines Matching refs:mtd_info
33 static struct mtd_info *mtd_info; variable
35 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len) in check_offs_len()
54 static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) in ram_erase()
64 static int ram_point(struct mtd_info *mtd, loff_t from, size_t len, in ram_point()
72 static int ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in ram_unpoint()
82 static unsigned long ram_get_unmapped_area(struct mtd_info *mtd, in ram_get_unmapped_area()
90 static int ram_read(struct mtd_info *mtd, loff_t from, size_t len, in ram_read()
98 static int ram_write(struct mtd_info *mtd, loff_t to, size_t len, in ram_write()
108 if (mtd_info) { in cleanup_mtdram()
109 mtd_device_unregister(mtd_info); in cleanup_mtdram()
110 vfree(mtd_info->priv); in cleanup_mtdram()
111 kfree(mtd_info); in cleanup_mtdram()
115 int mtdram_init_device(struct mtd_info *mtd, void *mapped_address, in mtdram_init_device()
153 mtd_info = kmalloc(sizeof(struct mtd_info), GFP_KERNEL); in init_mtdram()
154 if (!mtd_info) in init_mtdram()
159 kfree(mtd_info); in init_mtdram()
160 mtd_info = NULL; in init_mtdram()
163 err = mtdram_init_device(mtd_info, addr, MTDRAM_TOTAL_SIZE, "mtdram test device"); in init_mtdram()
166 kfree(mtd_info); in init_mtdram()
167 mtd_info = NULL; in init_mtdram()
170 memset(mtd_info->priv, 0xff, MTDRAM_TOTAL_SIZE); in init_mtdram()