Lines Matching refs:match
37 struct component_match *match; member
111 struct component_match *match = master->match; in find_components() local
115 if (!match) { in find_components()
127 for (i = 0; i < match->num; i++) { in find_components()
129 match->compare[i].fn, in find_components()
130 match->compare[i].data); in find_components()
233 struct component_match *match, size_t num) in component_match_realloc() argument
237 if (match && match->alloc == num) in component_match_realloc()
238 return match; in component_match_realloc()
244 if (match) { in component_match_realloc()
245 memcpy(new, match, component_match_size(min(match->num, num))); in component_match_realloc()
246 devm_kfree(dev, match); in component_match_realloc()
264 struct component_match *match = *matchptr; in component_match_add() local
266 if (IS_ERR(match)) in component_match_add()
269 if (!match || match->num == match->alloc) { in component_match_add()
270 size_t new_size = match ? match->alloc + 16 : 15; in component_match_add()
272 match = component_match_realloc(dev, match, new_size); in component_match_add()
274 *matchptr = match; in component_match_add()
276 if (IS_ERR(match)) in component_match_add()
280 match->compare[match->num].fn = compare; in component_match_add()
281 match->compare[match->num].data = compare_data; in component_match_add()
282 match->num++; in component_match_add()
288 struct component_match *match) in component_master_add_with_match() argument
293 if (ops->add_components && match) in component_master_add_with_match()
296 if (match) { in component_master_add_with_match()
298 match = component_match_realloc(dev, match, match->num); in component_master_add_with_match()
299 if (IS_ERR(match)) in component_master_add_with_match()
300 return PTR_ERR(match); in component_master_add_with_match()
309 master->match = match; in component_master_add_with_match()