Searched refs:mtdinfo (Results 1 - 3 of 3) sorted by relevance

/linux-4.4.14/drivers/mtd/devices/
H A Dslram.c60 struct mtd_info *mtdinfo; member in struct:slram_mtd_list
147 (*curmtd)->mtdinfo = kzalloc(sizeof(struct mtd_info), GFP_KERNEL); register_device()
150 if ((*curmtd)->mtdinfo) { register_device()
151 (*curmtd)->mtdinfo->priv = register_device()
154 if (!(*curmtd)->mtdinfo->priv) { register_device()
155 kfree((*curmtd)->mtdinfo); register_device()
156 (*curmtd)->mtdinfo = NULL; register_device()
160 if (!(*curmtd)->mtdinfo) { register_device()
165 if (!(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start = register_device()
170 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end = register_device()
171 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start + length; register_device()
174 (*curmtd)->mtdinfo->name = name; register_device()
175 (*curmtd)->mtdinfo->size = length; register_device()
176 (*curmtd)->mtdinfo->flags = MTD_CAP_RAM; register_device()
177 (*curmtd)->mtdinfo->_erase = slram_erase; register_device()
178 (*curmtd)->mtdinfo->_point = slram_point; register_device()
179 (*curmtd)->mtdinfo->_unpoint = slram_unpoint; register_device()
180 (*curmtd)->mtdinfo->_read = slram_read; register_device()
181 (*curmtd)->mtdinfo->_write = slram_write; register_device()
182 (*curmtd)->mtdinfo->owner = THIS_MODULE; register_device()
183 (*curmtd)->mtdinfo->type = MTD_RAM; register_device()
184 (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ; register_device()
185 (*curmtd)->mtdinfo->writesize = 1; register_device()
187 if (mtd_device_register((*curmtd)->mtdinfo, NULL, 0)) { register_device()
189 iounmap(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start); register_device()
190 kfree((*curmtd)->mtdinfo->priv); register_device()
191 kfree((*curmtd)->mtdinfo); register_device()
197 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start, register_device()
198 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end); register_device()
208 mtd_device_unregister(slram_mtdlist->mtdinfo); unregister_devices()
209 iounmap(((slram_priv_t *)slram_mtdlist->mtdinfo->priv)->start); unregister_devices()
210 kfree(slram_mtdlist->mtdinfo->priv); unregister_devices()
211 kfree(slram_mtdlist->mtdinfo); unregister_devices()
/linux-4.4.14/drivers/mtd/nand/
H A Dfsl_upm.c50 static inline struct fsl_upm_nand *to_fsl_upm_nand(struct mtd_info *mtdinfo) to_fsl_upm_nand() argument
52 return container_of(mtdinfo, struct fsl_upm_nand, mtd); to_fsl_upm_nand()
/linux-4.4.14/include/linux/mtd/
H A Dsh_flctl.h187 static inline struct sh_flctl *mtd_to_flctl(struct mtd_info *mtdinfo) mtd_to_flctl() argument
189 return container_of(mtdinfo, struct sh_flctl, mtd); mtd_to_flctl()

Completed in 129 milliseconds