Lines Matching refs:grp

447 		struct devres_group *grp;  in remove_nodes()  local
449 grp = node_to_group(node); in remove_nodes()
450 if (grp) { in remove_nodes()
452 grp->color = 0; in remove_nodes()
474 struct devres_group *grp; in remove_nodes() local
476 grp = node_to_group(node); in remove_nodes()
477 BUG_ON(!grp || list_empty(&grp->node[0].entry)); in remove_nodes()
479 grp->color++; in remove_nodes()
480 if (list_empty(&grp->node[1].entry)) in remove_nodes()
481 grp->color++; in remove_nodes()
483 BUG_ON(grp->color <= 0 || grp->color > 2); in remove_nodes()
484 if (grp->color == 2) { in remove_nodes()
488 list_move_tail(&grp->node[0].entry, todo); in remove_nodes()
489 list_del_init(&grp->node[1].entry); in remove_nodes()
554 struct devres_group *grp; in devres_open_group() local
557 grp = kmalloc(sizeof(*grp), gfp); in devres_open_group()
558 if (unlikely(!grp)) in devres_open_group()
561 grp->node[0].release = &group_open_release; in devres_open_group()
562 grp->node[1].release = &group_close_release; in devres_open_group()
563 INIT_LIST_HEAD(&grp->node[0].entry); in devres_open_group()
564 INIT_LIST_HEAD(&grp->node[1].entry); in devres_open_group()
565 set_node_dbginfo(&grp->node[0], "grp<", 0); in devres_open_group()
566 set_node_dbginfo(&grp->node[1], "grp>", 0); in devres_open_group()
567 grp->id = grp; in devres_open_group()
569 grp->id = id; in devres_open_group()
572 add_dr(dev, &grp->node[0]); in devres_open_group()
574 return grp->id; in devres_open_group()
584 struct devres_group *grp; in find_group() local
589 grp = container_of(node, struct devres_group, node[0]); in find_group()
592 if (grp->id == id) in find_group()
593 return grp; in find_group()
594 } else if (list_empty(&grp->node[1].entry)) in find_group()
595 return grp; in find_group()
611 struct devres_group *grp; in devres_close_group() local
616 grp = find_group(dev, id); in devres_close_group()
617 if (grp) in devres_close_group()
618 add_dr(dev, &grp->node[1]); in devres_close_group()
637 struct devres_group *grp; in devres_remove_group() local
642 grp = find_group(dev, id); in devres_remove_group()
643 if (grp) { in devres_remove_group()
644 list_del_init(&grp->node[0].entry); in devres_remove_group()
645 list_del_init(&grp->node[1].entry); in devres_remove_group()
646 devres_log(dev, &grp->node[0], "REM"); in devres_remove_group()
652 kfree(grp); in devres_remove_group()
670 struct devres_group *grp; in devres_release_group() local
677 grp = find_group(dev, id); in devres_release_group()
678 if (grp) { in devres_release_group()
679 struct list_head *first = &grp->node[0].entry; in devres_release_group()
682 if (!list_empty(&grp->node[1].entry)) in devres_release_group()
683 end = grp->node[1].entry.next; in devres_release_group()