Lines Matching refs:new_memtier
166 struct memory_tier *memtier, *new_memtier; in find_create_memory_tier() local
195 new_memtier = kzalloc(sizeof(struct memory_tier), GFP_KERNEL); in find_create_memory_tier()
196 if (!new_memtier) in find_create_memory_tier()
199 new_memtier->adistance_start = adistance; in find_create_memory_tier()
200 INIT_LIST_HEAD(&new_memtier->list); in find_create_memory_tier()
201 INIT_LIST_HEAD(&new_memtier->memory_types); in find_create_memory_tier()
203 list_add_tail(&new_memtier->list, &memtier->list); in find_create_memory_tier()
205 list_add_tail(&new_memtier->list, &memory_tiers); in find_create_memory_tier()
207 new_memtier->dev.id = adistance >> MEMTIER_CHUNK_BITS; in find_create_memory_tier()
208 new_memtier->dev.bus = &memory_tier_subsys; in find_create_memory_tier()
209 new_memtier->dev.release = memory_tier_device_release; in find_create_memory_tier()
210 new_memtier->dev.groups = memtier_dev_groups; in find_create_memory_tier()
212 ret = device_register(&new_memtier->dev); in find_create_memory_tier()
214 list_del(&new_memtier->list); in find_create_memory_tier()
215 put_device(&new_memtier->dev); in find_create_memory_tier()
218 memtier = new_memtier; in find_create_memory_tier()