Lines Matching defs:child
254 // And the parent is not dead, And this was the last child...
274 // child to the end of a device's list-of-children, but it is not
275 // legal to remove a child. This avoids badness when we have to
437 printf("device add: %p: is dead, cannot add child %p\n", parent, dev);
452 // create() must create only one child
453 if (ctx->child != nullptr) {
488 ctx->child = dev;
520 if (ctx && (ctx->child == nullptr)) {
521 ctx->child = dev;
550 static void devhost_unbind_child(zx_device_t* child) TA_REQ(&__devhost_api_lock) {
551 if (!(child->flags & DEV_FLAG_UNBOUND)) {
552 child->flags |= DEV_FLAG_UNBOUND;
553 // call child's unbind op
554 if (child->ops->unbind) {
556 printf("call unbind child: %p(%s)\n", child, child->name);
558 // hold a reference so the child won't get released during its unbind callback.
559 dev_ref_acquire(child);
561 child->Unbind();
563 dev_ref_release(child);
569 zx_device_t* child = nullptr;
574 list_for_every_entry(&dev->children, child, zx_device_t, node) {
575 if (!(child->flags & DEV_FLAG_DEAD)) {
576 devhost_unbind_child(child);
660 zx_device_t* child = nullptr;
661 list_for_every_entry(&dev->children, child, zx_device_t, node) {
662 if (!(child->flags & DEV_FLAG_DEAD)) {
663 st = devhost_device_suspend(child, flags);