Lines Matching refs:match
67 struct component_match *match; member
92 struct component_match *match = m->match; in component_devices_show() local
103 for (i = 0; i < match->num; i++) { in component_devices_show()
104 struct component *component = match->compare[i].component; in component_devices_show()
183 struct component_match *match = master->match; in find_components() local
191 for (i = 0; i < match->num; i++) { in find_components()
192 struct component_match_array *mc = &match->compare[i]; in find_components()
197 if (match->compare[i].component) in find_components()
209 match->compare[i].duplicate = !!c->master; in find_components()
210 match->compare[i].component = c; in find_components()
222 for (i = 0; i < master->match->num; i++) in remove_component()
223 if (master->match->compare[i].component == c) in remove_component()
224 master->match->compare[i].component = NULL; in remove_component()
294 struct component_match *match) in component_match_release() argument
298 for (i = 0; i < match->num; i++) { in component_match_release()
299 struct component_match_array *mc = &match->compare[i]; in component_match_release()
305 kfree(match->compare); in component_match_release()
314 struct component_match *match, size_t num) in component_match_realloc() argument
318 if (match->alloc == num) in component_match_realloc()
325 if (match->compare) { in component_match_realloc()
326 memcpy(new, match->compare, sizeof(*new) * in component_match_realloc()
327 min(match->num, num)); in component_match_realloc()
328 kfree(match->compare); in component_match_realloc()
330 match->compare = new; in component_match_realloc()
331 match->alloc = num; in component_match_realloc()
343 struct component_match *match = *matchptr; in __component_match_add() local
345 if (IS_ERR(match)) in __component_match_add()
348 if (!match) { in __component_match_add()
349 match = devres_alloc(devm_component_match_release, in __component_match_add()
350 sizeof(*match), GFP_KERNEL); in __component_match_add()
351 if (!match) { in __component_match_add()
356 devres_add(master, match); in __component_match_add()
358 *matchptr = match; in __component_match_add()
361 if (match->num == match->alloc) { in __component_match_add()
362 size_t new_size = match->alloc + 16; in __component_match_add()
365 ret = component_match_realloc(master, match, new_size); in __component_match_add()
372 match->compare[match->num].compare = compare; in __component_match_add()
373 match->compare[match->num].compare_typed = compare_typed; in __component_match_add()
374 match->compare[match->num].release = release; in __component_match_add()
375 match->compare[match->num].data = compare_data; in __component_match_add()
376 match->compare[match->num].component = NULL; in __component_match_add()
377 match->num++; in __component_match_add()
438 struct component_match *match = master->match; in free_master() local
444 if (match) { in free_master()
445 for (i = 0; i < match->num; i++) { in free_master()
446 struct component *c = match->compare[i].component; in free_master()
469 struct component_match *match) in component_master_add_with_match() argument
475 ret = component_match_realloc(dev, match, match->num); in component_master_add_with_match()
485 master->match = match; in component_master_add_with_match()
562 for (i = master->match->num; i--; ) in component_unbind_all()
563 if (!master->match->compare[i].duplicate) { in component_unbind_all()
564 c = master->match->compare[i].component; in component_unbind_all()
646 for (i = 0; i < master->match->num; i++) in component_bind_all()
647 if (!master->match->compare[i].duplicate) { in component_bind_all()
648 c = master->match->compare[i].component; in component_bind_all()
656 if (!master->match->compare[i - 1].duplicate) { in component_bind_all()
657 c = master->match->compare[i - 1].component; in component_bind_all()