Lines Matching refs:match

62 	struct component_match *match;  member
86 struct component_match *match = m->match; in component_devices_show() local
97 for (i = 0; i < match->num; i++) { in component_devices_show()
98 struct component *component = match->compare[i].component; in component_devices_show()
175 struct component_match *match = adev->match; in find_components() local
183 for (i = 0; i < match->num; i++) { in find_components()
184 struct component_match_array *mc = &match->compare[i]; in find_components()
189 if (match->compare[i].component) in find_components()
202 match->compare[i].duplicate = !!c->adev; in find_components()
203 match->compare[i].component = c; in find_components()
215 for (i = 0; i < adev->match->num; i++) in remove_component()
216 if (adev->match->compare[i].component == c) in remove_component()
217 adev->match->compare[i].component = NULL; in remove_component()
346 struct component_match *match = res; in devm_component_match_release() local
349 for (i = 0; i < match->num; i++) { in devm_component_match_release()
350 struct component_match_array *mc = &match->compare[i]; in devm_component_match_release()
356 kfree(match->compare); in devm_component_match_release()
359 static int component_match_realloc(struct component_match *match, size_t num) in component_match_realloc() argument
363 if (match->alloc == num) in component_match_realloc()
370 if (match->compare) { in component_match_realloc()
371 memcpy(new, match->compare, sizeof(*new) * in component_match_realloc()
372 min(match->num, num)); in component_match_realloc()
373 kfree(match->compare); in component_match_realloc()
375 match->compare = new; in component_match_realloc()
376 match->alloc = num; in component_match_realloc()
388 struct component_match *match = *matchptr; in __component_match_add() local
390 if (IS_ERR(match)) in __component_match_add()
393 if (!match) { in __component_match_add()
394 match = devres_alloc(devm_component_match_release, in __component_match_add()
395 sizeof(*match), GFP_KERNEL); in __component_match_add()
396 if (!match) { in __component_match_add()
401 devres_add(parent, match); in __component_match_add()
403 *matchptr = match; in __component_match_add()
406 if (match->num == match->alloc) { in __component_match_add()
407 size_t new_size = match->alloc + 16; in __component_match_add()
410 ret = component_match_realloc(match, new_size); in __component_match_add()
417 match->compare[match->num].compare = compare; in __component_match_add()
418 match->compare[match->num].compare_typed = compare_typed; in __component_match_add()
419 match->compare[match->num].release = release; in __component_match_add()
420 match->compare[match->num].data = compare_data; in __component_match_add()
421 match->compare[match->num].component = NULL; in __component_match_add()
422 match->num++; in __component_match_add()
483 struct component_match *match = adev->match; in free_aggregate_device() local
489 if (match) { in free_aggregate_device()
490 for (i = 0; i < match->num; i++) { in free_aggregate_device()
491 struct component *c = match->compare[i].component; in free_aggregate_device()
514 struct component_match *match) in component_master_add_with_match() argument
520 ret = component_match_realloc(match, match->num); in component_master_add_with_match()
530 adev->match = match; in component_master_add_with_match()
607 for (i = adev->match->num; i--; ) in component_unbind_all()
608 if (!adev->match->compare[i].duplicate) { in component_unbind_all()
609 c = adev->match->compare[i].component; in component_unbind_all()
691 for (i = 0; i < adev->match->num; i++) in component_bind_all()
692 if (!adev->match->compare[i].duplicate) { in component_bind_all()
693 c = adev->match->compare[i].component; in component_bind_all()
701 if (!adev->match->compare[i - 1].duplicate) { in component_bind_all()
702 c = adev->match->compare[i - 1].component; in component_bind_all()