Lines Matching full:new
93 struct phram_mtd_list *new; in register_device() local
96 new = kzalloc(sizeof(*new), GFP_KERNEL); in register_device()
97 if (!new) in register_device()
101 new->mtd.priv = ioremap(start, len); in register_device()
102 if (!new->mtd.priv) { in register_device()
108 new->mtd.name = name; in register_device()
109 new->mtd.size = len; in register_device()
110 new->mtd.flags = MTD_CAP_RAM; in register_device()
111 new->mtd._erase = phram_erase; in register_device()
112 new->mtd._point = phram_point; in register_device()
113 new->mtd._unpoint = phram_unpoint; in register_device()
114 new->mtd._read = phram_read; in register_device()
115 new->mtd._write = phram_write; in register_device()
116 new->mtd.owner = THIS_MODULE; in register_device()
117 new->mtd.type = MTD_RAM; in register_device()
118 new->mtd.erasesize = PAGE_SIZE; in register_device()
119 new->mtd.writesize = 1; in register_device()
122 if (mtd_device_register(&new->mtd, NULL, 0)) { in register_device()
123 pr_err("Failed to register new device\n"); in register_device()
127 list_add_tail(&new->list, &phram_list); in register_device()
131 iounmap(new->mtd.priv); in register_device()
133 kfree(new); in register_device()