diff options
author | Simon Glass <sjg@chromium.org> | 2018-10-01 12:22:05 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-10-09 04:40:27 -0600 |
commit | c7a3accc3f6a288ecbf9d62966792c93732060f2 (patch) | |
tree | f2c77590441fe8b946f191b56c861c589680debf /drivers/core/device.c | |
parent | 4af3e9ad8aebd4ed73a6dc2db856f0018d9850a5 (diff) |
dm: core: Alloc uclass-private data to be cache-aligned
There is no reason why this feature should not be supported for uclass-
private data. Update the code accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r-- | drivers/core/device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index feed43c8c3..73c99d1a65 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -331,7 +331,8 @@ int device_probe(struct udevice *dev) /* Allocate private data if requested and not reentered */ size = dev->uclass->uc_drv->per_device_auto_alloc_size; if (size && !dev->uclass_priv) { - dev->uclass_priv = calloc(1, size); + dev->uclass_priv = alloc_priv(size, + dev->uclass->uc_drv->flags); if (!dev->uclass_priv) { ret = -ENOMEM; goto fail; |