From d1998a9fde0a917d6496299f6a97b6bccfdc6724 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:21 -0700 Subject: dm: treewide: Rename ofdata_to_platdata() to of_to_plat() This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass --- drivers/core/acpi.c | 2 +- drivers/core/device.c | 14 +++++++------- drivers/core/devres.c | 2 +- drivers/core/root.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'drivers/core') diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c index 63a791f335e..0901b9260a1 100644 --- a/drivers/core/acpi.c +++ b/drivers/core/acpi.c @@ -269,7 +269,7 @@ int acpi_recurse_method(struct acpi_ctx *ctx, struct udevice *parent, void *start = ctx->current; log_debug("- method %d, %s %p\n", method, parent->name, func); - ret = device_ofdata_to_platdata(parent); + ret = device_of_to_plat(parent); if (ret) return log_msg_ret("ofdata", ret); ret = func(parent, ctx); diff --git a/drivers/core/device.c b/drivers/core/device.c index 332b1d090e4..a6b8c3ef244 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -326,7 +326,7 @@ static void *alloc_priv(int size, uint flags) return priv; } -int device_ofdata_to_platdata(struct udevice *dev) +int device_of_to_plat(struct udevice *dev) { const struct driver *drv; int size = 0; @@ -340,7 +340,7 @@ int device_ofdata_to_platdata(struct udevice *dev) /* Ensure all parents have ofdata */ if (dev->parent) { - ret = device_ofdata_to_platdata(dev->parent); + ret = device_of_to_plat(dev->parent); if (ret) goto fail; @@ -391,9 +391,9 @@ int device_ofdata_to_platdata(struct udevice *dev) } } - if (drv->ofdata_to_platdata && + if (drv->of_to_plat && (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { - ret = drv->ofdata_to_platdata(dev); + ret = drv->of_to_plat(dev); if (ret) goto fail; } @@ -422,7 +422,7 @@ int device_probe(struct udevice *dev) drv = dev->driver; assert(drv); - ret = device_ofdata_to_platdata(dev); + ret = device_of_to_plat(dev); if (ret) goto fail; @@ -881,7 +881,7 @@ int device_first_child_ofdata_err(struct udevice *parent, struct udevice **devp) if (!dev) return -ENODEV; - ret = device_ofdata_to_platdata(dev); + ret = device_of_to_plat(dev); if (ret) return ret; @@ -899,7 +899,7 @@ int device_next_child_ofdata_err(struct udevice **devp) if (!dev) return -ENODEV; - ret = device_ofdata_to_platdata(dev); + ret = device_of_to_plat(dev); if (ret) return ret; diff --git a/drivers/core/devres.c b/drivers/core/devres.c index 88244698b0c..522b07d613f 100644 --- a/drivers/core/devres.c +++ b/drivers/core/devres.c @@ -23,7 +23,7 @@ /** enum devres_phase - Shows where resource was allocated * * DEVRES_PHASE_BIND: In the bind() method - * DEVRES_PHASE_OFDATA: In the ofdata_to_platdata() method + * DEVRES_PHASE_OFDATA: In the of_to_plat() method * DEVRES_PHASE_PROBE: In the probe() method */ enum devres_phase { diff --git a/drivers/core/root.c b/drivers/core/root.c index 348dc9e1c1f..42f8f0cedd4 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -69,8 +69,8 @@ void fix_drivers(void) entry->remove += gd->reloc_off; if (entry->unbind) entry->unbind += gd->reloc_off; - if (entry->ofdata_to_platdata) - entry->ofdata_to_platdata += gd->reloc_off; + if (entry->of_to_plat) + entry->of_to_plat += gd->reloc_off; if (entry->child_post_bind) entry->child_post_bind += gd->reloc_off; if (entry->child_pre_probe) -- cgit v1.2.3