From 4f50086ad6d69c355a07389fb436c64c92ec614a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:19 -0700 Subject: dm: Rename 'platdata_size' to 'plat_size' Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass --- drivers/core/device.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'drivers/core') diff --git a/drivers/core/device.c b/drivers/core/device.c index 7a02d438508..6933edc567f 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR; static int device_bind_common(struct udevice *parent, const struct driver *drv, const char *name, void *plat, ulong driver_data, ofnode node, - uint of_platdata_size, struct udevice **devp) + uint of_plat_size, struct udevice **devp) { struct udevice *dev; struct uclass *uc; @@ -100,9 +100,9 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, bool alloc = !plat; if (CONFIG_IS_ENABLED(OF_PLATDATA)) { - if (of_platdata_size) { + if (of_plat_size) { dev->flags |= DM_FLAG_OF_PLATDATA; - if (of_platdata_size < drv->plat_auto) + if (of_plat_size < drv->plat_auto) alloc = true; } } @@ -114,8 +114,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, goto fail_alloc1; } if (CONFIG_IS_ENABLED(OF_PLATDATA) && plat) { - memcpy(dev->plat, plat, - of_platdata_size); + memcpy(dev->plat, plat, of_plat_size); } } } @@ -241,7 +240,7 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, const struct driver_info *info, struct udevice **devp) { struct driver *drv; - uint platdata_size = 0; + uint plat_size = 0; int ret; drv = lists_driver_lookup_name(info->name); @@ -251,10 +250,10 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, return -EPERM; #if CONFIG_IS_ENABLED(OF_PLATDATA) - platdata_size = info->platdata_size; + plat_size = info->plat_size; #endif ret = device_bind_common(parent, drv, info->name, (void *)info->plat, 0, - ofnode_null(), platdata_size, devp); + ofnode_null(), plat_size, devp); if (ret) return ret; -- cgit v1.2.3