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

/linux-4.1.27/drivers/mtd/devices/
H A Dslram.c135 slram_mtd_list_t **curmtd; register_device() local
137 curmtd = &slram_mtdlist; register_device()
138 while (*curmtd) { register_device()
139 curmtd = &(*curmtd)->next; register_device()
142 *curmtd = kmalloc(sizeof(slram_mtd_list_t), GFP_KERNEL); register_device()
143 if (!(*curmtd)) { register_device()
147 (*curmtd)->mtdinfo = kzalloc(sizeof(struct mtd_info), GFP_KERNEL); register_device()
148 (*curmtd)->next = NULL; 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()

Completed in 99 milliseconds