• Home
  • Raw
  • Download

Lines Matching refs:dr

88 	struct devres *dr;  in alloc_dr()  local
90 dr = kmalloc_node_track_caller(tot_size, gfp, nid); in alloc_dr()
91 if (unlikely(!dr)) in alloc_dr()
94 memset(dr, 0, offsetof(struct devres, data)); in alloc_dr()
96 INIT_LIST_HEAD(&dr->node.entry); in alloc_dr()
97 dr->node.release = release; in alloc_dr()
98 return dr; in alloc_dr()
112 struct devres *dr; in __devres_alloc_node() local
114 dr = alloc_dr(release, size, gfp | __GFP_ZERO, nid); in __devres_alloc_node()
115 if (unlikely(!dr)) in __devres_alloc_node()
117 set_node_dbginfo(&dr->node, name, size); in __devres_alloc_node()
118 return dr->data; in __devres_alloc_node()
138 struct devres *dr; in devres_alloc_node() local
140 dr = alloc_dr(release, size, gfp | __GFP_ZERO, nid); in devres_alloc_node()
141 if (unlikely(!dr)) in devres_alloc_node()
143 return dr->data; in devres_alloc_node()
178 struct devres *dr = container_of(node, struct devres, node); in devres_for_each_res() local
182 if (match && !match(dev, dr->data, match_data)) in devres_for_each_res()
184 fn(dev, dr->data, data); in devres_for_each_res()
199 struct devres *dr = container_of(res, struct devres, data); in devres_free() local
201 BUG_ON(!list_empty(&dr->node.entry)); in devres_free()
202 kfree(dr); in devres_free()
218 struct devres *dr = container_of(res, struct devres, data); in devres_add() local
222 add_dr(dev, &dr->node); in devres_add()
233 struct devres *dr = container_of(node, struct devres, node); in find_dr() local
237 if (match && !match(dev, dr->data, match_data)) in find_dr()
239 return dr; in find_dr()
262 struct devres *dr; in devres_find() local
266 dr = find_dr(dev, release, match, match_data); in devres_find()
269 if (dr) in devres_find()
270 return dr->data; in devres_find()
293 struct devres *dr; in devres_get() local
297 dr = find_dr(dev, new_dr->node.release, match, match_data); in devres_get()
298 if (!dr) { in devres_get()
300 dr = new_dr; in devres_get()
306 return dr->data; in devres_get()
328 struct devres *dr; in devres_remove() local
332 dr = find_dr(dev, release, match, match_data); in devres_remove()
333 if (dr) { in devres_remove()
334 list_del_init(&dr->node.entry); in devres_remove()
335 devres_log(dev, &dr->node, "REM"); in devres_remove()
339 if (dr) in devres_remove()
340 return dr->data; in devres_remove()
483 struct devres *dr, *tmp; in release_nodes() local
492 list_for_each_entry_safe_reverse(dr, tmp, &todo, node.entry) { in release_nodes()
493 devres_log(dev, &dr->node, "REL"); in release_nodes()
494 dr->node.release(dev, dr->data); in release_nodes()
495 kfree(dr); in release_nodes()
777 struct devres *dr; in devm_kmalloc() local
780 dr = alloc_dr(devm_kmalloc_release, size, gfp, dev_to_node(dev)); in devm_kmalloc()
781 if (unlikely(!dr)) in devm_kmalloc()
788 set_node_dbginfo(&dr->node, "devm_kzalloc_release", size); in devm_kmalloc()
789 devres_add(dev, dr->data); in devm_kmalloc()
790 return dr->data; in devm_kmalloc()