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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index ee97cc84ff..2f33b0e6a3 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -83,6 +83,10 @@ int device_bind(struct udevice *parent, struct driver *drv, const char *name,
if (parent) {
int size = parent->driver->per_child_platdata_auto_alloc_size;
+ if (!size) {
+ size = parent->uclass->uc_drv->
+ per_child_platdata_auto_alloc_size;
+ }
if (size) {
dev->flags |= DM_FLAG_ALLOC_PARENT_PDATA;
dev->parent_platdata = calloc(1, size);
OpenPOWER on IntegriCloud