Lines Matching refs:curmtd

131 	slram_mtd_list_t **curmtd;  in register_device()  local
133 curmtd = &slram_mtdlist; in register_device()
134 while (*curmtd) { in register_device()
135 curmtd = &(*curmtd)->next; in register_device()
138 *curmtd = kmalloc(sizeof(slram_mtd_list_t), GFP_KERNEL); in register_device()
139 if (!(*curmtd)) { in register_device()
143 (*curmtd)->mtdinfo = kzalloc(sizeof(struct mtd_info), GFP_KERNEL); in register_device()
144 (*curmtd)->next = NULL; 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()