summaryrefslogtreecommitdiffstats
path: root/drivers/core/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r--drivers/core/device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 818d03fac1..1e5584a7ce 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -135,6 +135,11 @@ int device_bind(struct udevice *parent, const struct driver *drv,
if (ret)
goto fail_child_post_bind;
}
+ if (uc->uc_drv->post_bind) {
+ ret = uc->uc_drv->post_bind(dev);
+ if (ret)
+ goto fail_uclass_post_bind;
+ }
if (parent)
dm_dbg("Bound device %s to %s\n", dev->name, parent->name);
@@ -145,6 +150,8 @@ int device_bind(struct udevice *parent, const struct driver *drv,
return 0;
+fail_uclass_post_bind:
+ /* There is no child unbind() method, so no clean-up required */
fail_child_post_bind:
if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
if (drv->unbind && drv->unbind(dev)) {
OpenPOWER on IntegriCloud