Lines Matching full:dr

114 	struct devres *dr;  in alloc_dr()  local
119 dr = kmalloc_node_track_caller(tot_size, gfp, nid); in alloc_dr()
120 if (unlikely(!dr)) in alloc_dr()
125 memset(dr, 0, offsetof(struct devres, data)); in alloc_dr()
127 INIT_LIST_HEAD(&dr->node.entry); in alloc_dr()
128 dr->node.release = release; in alloc_dr()
129 return dr; in alloc_dr()
165 struct devres *dr; in __devres_alloc_node() local
167 dr = alloc_dr(release, size, gfp | __GFP_ZERO, nid); in __devres_alloc_node()
168 if (unlikely(!dr)) in __devres_alloc_node()
170 set_node_dbginfo(&dr->node, name, size); in __devres_alloc_node()
171 return dr->data; in __devres_alloc_node()
205 struct devres *dr = container_of(node, struct devres, node); in devres_for_each_res() local
209 if (match && !match(dev, dr->data, match_data)) in devres_for_each_res()
211 fn(dev, dr->data, data); in devres_for_each_res()
226 struct devres *dr = container_of(res, struct devres, data); in devres_free() local
228 BUG_ON(!list_empty(&dr->node.entry)); in devres_free()
229 kfree(dr); in devres_free()
245 struct devres *dr = container_of(res, struct devres, data); in devres_add() local
249 add_dr(dev, &dr->node); in devres_add()
260 struct devres *dr = container_of(node, struct devres, node); in find_dr() local
264 if (match && !match(dev, dr->data, match_data)) in find_dr()
266 return dr; in find_dr()
289 struct devres *dr; in devres_find() local
293 dr = find_dr(dev, release, match, match_data); in devres_find()
296 if (dr) in devres_find()
297 return dr->data; in devres_find()
320 struct devres *dr; in devres_get() local
324 dr = find_dr(dev, new_dr->node.release, match, match_data); in devres_get()
325 if (!dr) { in devres_get()
327 dr = new_dr; in devres_get()
333 return dr->data; in devres_get()
355 struct devres *dr; in devres_remove() local
359 dr = find_dr(dev, release, match, match_data); in devres_remove()
360 if (dr) { in devres_remove()
361 list_del_init(&dr->node.entry); in devres_remove()
362 devres_log(dev, &dr->node, "REM"); in devres_remove()
366 if (dr) in devres_remove()
367 return dr->data; in devres_remove()
498 struct devres *dr, *tmp; in release_nodes() local
503 list_for_each_entry_safe_reverse(dr, tmp, todo, node.entry) { in release_nodes()
504 devres_log(dev, &dr->node, "REL"); in release_nodes()
505 dr->node.release(dev, dr->data); in release_nodes()
506 kfree(dr); in release_nodes()
824 struct devres *dr; in devm_kmalloc() local
830 dr = alloc_dr(devm_kmalloc_release, size, gfp, dev_to_node(dev)); in devm_kmalloc()
831 if (unlikely(!dr)) in devm_kmalloc()
838 set_node_dbginfo(&dr->node, "devm_kzalloc_release", size); in devm_kmalloc()
839 devres_add(dev, dr->data); in devm_kmalloc()
840 return dr->data; in devm_kmalloc()