Lines Matching refs:mtdinfo
61 struct mtd_info *mtdinfo; member
143 (*curmtd)->mtdinfo = kzalloc(sizeof(struct mtd_info), GFP_KERNEL); in register_device()
146 if ((*curmtd)->mtdinfo) { in register_device()
147 (*curmtd)->mtdinfo->priv = in register_device()
150 if (!(*curmtd)->mtdinfo->priv) { in register_device()
151 kfree((*curmtd)->mtdinfo); in register_device()
152 (*curmtd)->mtdinfo = NULL; in register_device()
156 if (!(*curmtd)->mtdinfo) { in register_device()
161 if (!(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start = in register_device()
167 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end = in register_device()
168 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start + length; in register_device()
171 (*curmtd)->mtdinfo->name = name; in register_device()
172 (*curmtd)->mtdinfo->size = length; in register_device()
173 (*curmtd)->mtdinfo->flags = MTD_CAP_RAM; in register_device()
174 (*curmtd)->mtdinfo->_erase = slram_erase; in register_device()
175 (*curmtd)->mtdinfo->_point = slram_point; in register_device()
176 (*curmtd)->mtdinfo->_unpoint = slram_unpoint; in register_device()
177 (*curmtd)->mtdinfo->_read = slram_read; in register_device()
178 (*curmtd)->mtdinfo->_write = slram_write; in register_device()
179 (*curmtd)->mtdinfo->owner = THIS_MODULE; in register_device()
180 (*curmtd)->mtdinfo->type = MTD_RAM; in register_device()
181 (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ; in register_device()
182 (*curmtd)->mtdinfo->writesize = 1; in register_device()
184 if (mtd_device_register((*curmtd)->mtdinfo, NULL, 0)) { in register_device()
186 memunmap(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start); in register_device()
187 kfree((*curmtd)->mtdinfo->priv); in register_device()
188 kfree((*curmtd)->mtdinfo); in register_device()
194 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start, in register_device()
195 ((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end); in register_device()
205 mtd_device_unregister(slram_mtdlist->mtdinfo); in unregister_devices()
206 memunmap(((slram_priv_t *)slram_mtdlist->mtdinfo->priv)->start); in unregister_devices()
207 kfree(slram_mtdlist->mtdinfo->priv); in unregister_devices()
208 kfree(slram_mtdlist->mtdinfo); in unregister_devices()