Lines Matching refs:match

41 	struct component_match *match;  member
65 struct component_match *match = m->match; in component_devices_show() local
76 for (i = 0; i < match->num; i++) { in component_devices_show()
77 struct device *d = (struct device *)match->compare[i].data; in component_devices_show()
80 match->compare[i].component ? in component_devices_show()
162 struct component_match *match = master->match; in find_components() local
170 for (i = 0; i < match->num; i++) { in find_components()
171 struct component_match_array *mc = &match->compare[i]; in find_components()
176 if (match->compare[i].component) in find_components()
188 match->compare[i].duplicate = !!c->master; in find_components()
189 match->compare[i].component = c; in find_components()
201 for (i = 0; i < master->match->num; i++) in remove_component()
202 if (master->match->compare[i].component == c) in remove_component()
203 master->match->compare[i].component = NULL; in remove_component()
272 struct component_match *match) in component_match_release() argument
276 for (i = 0; i < match->num; i++) { in component_match_release()
277 struct component_match_array *mc = &match->compare[i]; in component_match_release()
283 kfree(match->compare); in component_match_release()
292 struct component_match *match, size_t num) in component_match_realloc() argument
296 if (match->alloc == num) in component_match_realloc()
303 if (match->compare) { in component_match_realloc()
304 memcpy(new, match->compare, sizeof(*new) * in component_match_realloc()
305 min(match->num, num)); in component_match_realloc()
306 kfree(match->compare); in component_match_realloc()
308 match->compare = new; in component_match_realloc()
309 match->alloc = num; in component_match_realloc()
324 struct component_match *match = *matchptr; in component_match_add_release() local
326 if (IS_ERR(match)) in component_match_add_release()
329 if (!match) { in component_match_add_release()
330 match = devres_alloc(devm_component_match_release, in component_match_add_release()
331 sizeof(*match), GFP_KERNEL); in component_match_add_release()
332 if (!match) { in component_match_add_release()
337 devres_add(master, match); in component_match_add_release()
339 *matchptr = match; in component_match_add_release()
342 if (match->num == match->alloc) { in component_match_add_release()
343 size_t new_size = match->alloc + 16; in component_match_add_release()
346 ret = component_match_realloc(master, match, new_size); in component_match_add_release()
353 match->compare[match->num].compare = compare; in component_match_add_release()
354 match->compare[match->num].release = release; in component_match_add_release()
355 match->compare[match->num].data = compare_data; in component_match_add_release()
356 match->compare[match->num].component = NULL; in component_match_add_release()
357 match->num++; in component_match_add_release()
363 struct component_match *match = master->match; in free_master() local
369 if (match) { in free_master()
370 for (i = 0; i < match->num; i++) { in free_master()
371 struct component *c = match->compare[i].component; in free_master()
382 struct component_match *match) in component_master_add_with_match() argument
388 ret = component_match_realloc(dev, match, match->num); in component_master_add_with_match()
398 master->match = match; in component_master_add_with_match()
456 for (i = master->match->num; i--; ) in component_unbind_all()
457 if (!master->match->compare[i].duplicate) { in component_unbind_all()
458 c = master->match->compare[i].component; in component_unbind_all()
530 for (i = 0; i < master->match->num; i++) in component_bind_all()
531 if (!master->match->compare[i].duplicate) { in component_bind_all()
532 c = master->match->compare[i].component; in component_bind_all()
540 if (!master->match->compare[i].duplicate) { in component_bind_all()
541 c = master->match->compare[i].component; in component_bind_all()