aboutsummaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass2020-12-03 16:55:19 -0700
committerSimon Glass2020-12-13 16:51:09 -0700
commit4f50086ad6d69c355a07389fb436c64c92ec614a (patch)
tree378f571fa378fb8e2f4bb38859face7d7b855600 /drivers/core
parentcaa4daa2ae3dc0a3e516addea5772c9af76abcb0 (diff)
dm: Rename 'platdata_size' to 'plat_size'
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/device.c15
1 files changed, 7 insertions, 8 deletions
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;