aboutsummaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass2020-12-03 16:55:21 -0700
committerSimon Glass2020-12-13 16:51:09 -0700
commitd1998a9fde0a917d6496299f6a97b6bccfdc6724 (patch)
tree1931d0c875e829620180bf383722c1a69bd1a951 /drivers/core
parentc69cda25c9b59e53a6bc8969ada58942549f5b5d (diff)
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 <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/acpi.c2
-rw-r--r--drivers/core/device.c14
-rw-r--r--drivers/core/devres.c2
-rw-r--r--drivers/core/root.c4
4 files changed, 11 insertions, 11 deletions
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)