Lines Matching refs:match
38 * Aggregate drivers first assemble a component match list of what they need
67 struct component_match *match;
92 struct component_match *match = m->match;
103 for (i = 0; i < match->num; i++) {
104 struct component *component = match->compare[i].component;
183 struct component_match *match = master->match;
188 * Scan the array of match functions and attach
191 for (i = 0; i < match->num; i++) {
192 struct component_match_array *mc = &match->compare[i];
197 if (match->compare[i].component)
209 match->compare[i].duplicate = !!c->master;
210 match->compare[i].component = c;
222 for (i = 0; i < master->match->num; i++)
223 if (master->match->compare[i].component == c)
224 master->match->compare[i].component = NULL;
294 struct component_match *match)
298 for (i = 0; i < match->num; i++) {
299 struct component_match_array *mc = &match->compare[i];
305 kfree(match->compare);
314 struct component_match *match, size_t num)
318 if (match->alloc == num)
325 if (match->compare) {
326 memcpy(new, match->compare, sizeof(*new) *
327 min(match->num, num));
328 kfree(match->compare);
330 match->compare = new;
331 match->alloc = num;
343 struct component_match *match = *matchptr;
345 if (IS_ERR(match))
348 if (!match) {
349 match = devres_alloc(devm_component_match_release,
350 sizeof(*match), GFP_KERNEL);
351 if (!match) {
356 devres_add(master, match);
358 *matchptr = match;
361 if (match->num == match->alloc) {
362 size_t new_size = match->alloc + 16;
365 ret = component_match_realloc(master, match, new_size);
372 match->compare[match->num].compare = compare;
373 match->compare[match->num].compare_typed = compare_typed;
374 match->compare[match->num].release = release;
375 match->compare[match->num].data = compare_data;
376 match->compare[match->num].component = NULL;
377 match->num++;
381 * component_match_add_release - add a component match entry with release callback
385 * @compare: compare function to match against all components
388 * Adds a new component match to the list stored in @matchptr, which the @master
390 * by @matchptr must be initialized to NULL before adding the first match. This
393 * The allocated match list in @matchptr is automatically released using devm
411 * component_match_add_typed - add a component match entry for a typed component
414 * @compare_typed: compare function to match against all typed components
417 * Adds a new component match to the list stored in @matchptr, which the @master
419 * by @matchptr must be initialized to NULL before adding the first match. This
422 * The allocated match list in @matchptr is automatically released using devm
438 struct component_match *match = master->match;
444 if (match) {
445 for (i = 0; i < match->num; i++) {
446 struct component *c = match->compare[i].component;
459 * @match: component match list for the aggregate driver
461 * Registers a new aggregate driver consisting of the components added to @match
463 * @match are available, it will be assembled by calling
469 struct component_match *match)
474 /* Reallocate the match array for its true size */
475 ret = component_match_realloc(dev, match, match->num);
485 master->match = match;
562 for (i = master->match->num; i--; )
563 if (!master->match->compare[i].duplicate) {
564 c = master->match->compare[i].component;
645 /* Bind components in match order */
646 for (i = 0; i < master->match->num; i++)
647 if (!master->match->compare[i].duplicate) {
648 c = master->match->compare[i].component;
656 if (!master->match->compare[i - 1].duplicate) {
657 c = master->match->compare[i - 1].component;
709 * components registerd on the same device @dev. These components are match