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()
570 grp->color = 0; in devres_open_group()
573 add_dr(dev, &grp->node[0]); in devres_open_group()
575 return grp->id; in devres_open_group()
585 struct devres_group *grp; in find_group() local
590 grp = container_of(node, struct devres_group, node[0]); in find_group()
593 if (grp->id == id) in find_group()
594 return grp; in find_group()
595 } else if (list_empty(&grp->node[1].entry)) in find_group()
596 return grp; in find_group()
612 struct devres_group *grp; in devres_close_group() local
617 grp = find_group(dev, id); in devres_close_group()
618 if (grp) in devres_close_group()
619 add_dr(dev, &grp->node[1]); in devres_close_group()
638 struct devres_group *grp; in devres_remove_group() local
643 grp = find_group(dev, id); in devres_remove_group()
644 if (grp) { in devres_remove_group()
645 list_del_init(&grp->node[0].entry); in devres_remove_group()
646 list_del_init(&grp->node[1].entry); in devres_remove_group()
647 devres_log(dev, &grp->node[0], "REM"); in devres_remove_group()
653 kfree(grp); in devres_remove_group()
671 struct devres_group *grp; in devres_release_group() local
678 grp = find_group(dev, id); in devres_release_group()
679 if (grp) { in devres_release_group()
680 struct list_head *first = &grp->node[0].entry; in devres_release_group()
683 if (!list_empty(&grp->node[1].entry)) in devres_release_group()
684 end = grp->node[1].entry.next; in devres_release_group()