int uclass_bind_device(struct udevice *dev) { struct uclass *uc; int ret; uc = dev->uclass;
// list_add_tail(&dev->uclass_node, &uc->dev_head); if (dev->parent) { struct uclass_driver *uc_drv = dev->parent->uclass->uc_drv; if (uc_drv->child_post_bind) { ret = uc_drv->child_post_bind(dev); if (ret) goto err; } } return 0; err: /* There is no need to undo the parent's post_bind call */ list_del(&dev->uclass_node); return ret; }