Lines Matching defs:mtd
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/map.h>
47 struct mtd_info *mtd;
49 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
50 if (!mtd) {
55 mtd->priv = map;
56 mtd->name = map->name;
57 mtd->type = MTD_ABSENT;
58 mtd->size = map->size;
59 mtd->_erase = map_absent_erase;
60 mtd->_read = map_absent_read;
61 mtd->_write = map_absent_write;
62 mtd->_sync = map_absent_sync;
63 mtd->flags = 0;
64 mtd->erasesize = PAGE_SIZE;
65 mtd->writesize = 1;
68 return mtd;
72 static int map_absent_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
77 static int map_absent_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
82 static int map_absent_erase(struct mtd_info *mtd, struct erase_info *instr)
87 static void map_absent_sync(struct mtd_info *mtd)
92 static void map_absent_destroy(struct mtd_info *mtd)