Lines Matching refs:mtdinfo
61 struct mtd_info *mtdinfo; member
173 (*curmtd)->mtdinfo = kzalloc(sizeof(struct mtd_info), GFP_KERNEL); in register_device()
176 if ((*curmtd)->mtdinfo) { in register_device()
177 (*curmtd)->mtdinfo->priv = in register_device()
180 if (!(*curmtd)->mtdinfo->priv) { in register_device()
181 kfree((*curmtd)->mtdinfo); in register_device()
182 (*curmtd)->mtdinfo = NULL; in register_device()
186 if (!(*curmtd)->mtdinfo) { in register_device()
191 if (!(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start = in register_device()
196 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end = in register_device()
197 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start + length; in register_device()
200 (*curmtd)->mtdinfo->name = name; in register_device()
201 (*curmtd)->mtdinfo->size = length; in register_device()
202 (*curmtd)->mtdinfo->flags = MTD_CAP_RAM; in register_device()
203 (*curmtd)->mtdinfo->erase = slram_erase; in register_device()
204 (*curmtd)->mtdinfo->point = slram_point; in register_device()
205 (*curmtd)->mtdinfo->unpoint = slram_unpoint; in register_device()
206 (*curmtd)->mtdinfo->read = slram_read; in register_device()
207 (*curmtd)->mtdinfo->write = slram_write; in register_device()
208 (*curmtd)->mtdinfo->owner = THIS_MODULE; in register_device()
209 (*curmtd)->mtdinfo->type = MTD_RAM; in register_device()
210 (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ; in register_device()
211 (*curmtd)->mtdinfo->writesize = 1; in register_device()
213 if (add_mtd_device((*curmtd)->mtdinfo)) { in register_device()
215 iounmap(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start); in register_device()
216 kfree((*curmtd)->mtdinfo->priv); in register_device()
217 kfree((*curmtd)->mtdinfo); in register_device()
223 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start, in register_device()
224 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end); in register_device()
234 del_mtd_device(slram_mtdlist->mtdinfo); in unregister_devices()
235 iounmap(((slram_priv_t *)slram_mtdlist->mtdinfo->priv)->start); in unregister_devices()
236 kfree(slram_mtdlist->mtdinfo->priv); in unregister_devices()
237 kfree(slram_mtdlist->mtdinfo); in unregister_devices()