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>
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index f1653ba..f4270cc 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -660,7 +660,7 @@
}
/**
- * pcie_advk_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_advk_of_to_plat() - Translate from DT to device state
*
* @dev: A pointer to the device being operated on
*
@@ -670,7 +670,7 @@
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_advk_ofdata_to_platdata(struct udevice *dev)
+static int pcie_advk_of_to_plat(struct udevice *dev)
{
struct pcie_advk *pcie = dev_get_priv(dev);
@@ -697,7 +697,7 @@
.id = UCLASS_PCI,
.of_match = pcie_advk_ids,
.ops = &pcie_advk_ops,
- .ofdata_to_platdata = pcie_advk_ofdata_to_platdata,
+ .of_to_plat = pcie_advk_of_to_plat,
.probe = pcie_advk_probe,
.remove = pcie_advk_remove,
.flags = DM_FLAG_OS_PREPARE,
diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c
index cff1a41..dc11402 100644
--- a/drivers/pci/pci-rcar-gen2.c
+++ b/drivers/pci/pci-rcar-gen2.c
@@ -231,7 +231,7 @@
return 0;
}
-static int rcar_gen2_pci_ofdata_to_platdata(struct udevice *dev)
+static int rcar_gen2_pci_of_to_plat(struct udevice *dev)
{
struct rcar_gen2_pci_priv *priv = dev_get_priv(dev);
@@ -259,6 +259,6 @@
.of_match = rcar_gen2_pci_ids,
.ops = &rcar_gen2_pci_ops,
.probe = rcar_gen2_pci_probe,
- .ofdata_to_platdata = rcar_gen2_pci_ofdata_to_platdata,
+ .of_to_plat = rcar_gen2_pci_of_to_plat,
.priv_auto = sizeof(struct rcar_gen2_pci_priv),
};
diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c
index 9ef6314..0d5b01f 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -372,7 +372,7 @@
return 0;
}
-static int rcar_gen3_pcie_ofdata_to_platdata(struct udevice *dev)
+static int rcar_gen3_pcie_of_to_plat(struct udevice *dev)
{
struct rcar_gen3_pcie_priv *priv = dev_get_plat(dev);
@@ -399,6 +399,6 @@
.of_match = rcar_gen3_pcie_ids,
.ops = &rcar_gen3_pcie_ops,
.probe = rcar_gen3_pcie_probe,
- .ofdata_to_platdata = rcar_gen3_pcie_ofdata_to_platdata,
+ .of_to_plat = rcar_gen3_pcie_of_to_plat,
.plat_auto = sizeof(struct rcar_gen3_pcie_priv),
};
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 7625d43..344749b 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -58,7 +58,7 @@
* will produce a bad BDF>
*
* A common cause of this problem is that this function is called in the
- * ofdata_to_platdata() method of @dev. Accessing the PCI bus in that
+ * of_to_plat() method of @dev. Accessing the PCI bus in that
* method is not allowed, since it has not yet been probed. To fix this,
* move that access to the probe() method of @dev instead.
*/
diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c
index 9cb95da..ab6ff45 100644
--- a/drivers/pci/pci_mpc85xx.c
+++ b/drivers/pci/pci_mpc85xx.c
@@ -122,7 +122,7 @@
return 0;
}
-static int mpc85xx_pci_ofdata_to_platdata(struct udevice *dev)
+static int mpc85xx_pci_of_to_plat(struct udevice *dev)
{
struct mpc85xx_pci_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
@@ -154,6 +154,6 @@
.ops = &mpc85xx_pci_ops,
.probe = mpc85xx_pci_dm_probe,
.remove = mpc85xx_pci_dm_remove,
- .ofdata_to_platdata = mpc85xx_pci_ofdata_to_platdata,
+ .of_to_plat = mpc85xx_pci_of_to_plat,
.priv_auto = sizeof(struct mpc85xx_pci_priv),
};
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index f2d6222..cf6e0a2 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -410,7 +410,7 @@
return -ENOENT;
}
-static int mvebu_pcie_ofdata_to_platdata(struct udevice *dev)
+static int mvebu_pcie_of_to_plat(struct udevice *dev)
{
struct mvebu_pcie *pcie = dev_get_plat(dev);
int ret = 0;
@@ -470,7 +470,7 @@
.id = UCLASS_PCI,
.ops = &mvebu_pcie_ops,
.probe = mvebu_pcie_probe,
- .ofdata_to_platdata = mvebu_pcie_ofdata_to_platdata,
+ .of_to_plat = mvebu_pcie_of_to_plat,
.plat_auto = sizeof(struct mvebu_pcie),
};
diff --git a/drivers/pci/pci_octeontx.c b/drivers/pci/pci_octeontx.c
index d211d22..1693283 100644
--- a/drivers/pci/pci_octeontx.c
+++ b/drivers/pci/pci_octeontx.c
@@ -311,7 +311,7 @@
return ret;
}
-static int pci_octeontx_ofdata_to_platdata(struct udevice *dev)
+static int pci_octeontx_of_to_plat(struct udevice *dev)
{
return 0;
}
@@ -357,7 +357,7 @@
.id = UCLASS_PCI,
.of_match = pci_octeontx_ids,
.ops = &pci_octeontx_ops,
- .ofdata_to_platdata = pci_octeontx_ofdata_to_platdata,
+ .of_to_plat = pci_octeontx_of_to_plat,
.probe = pci_octeontx_probe,
.priv_auto = sizeof(struct octeontx_pci),
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index 386b25a..9cb4414 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -1092,7 +1092,7 @@
},
};
-static int pci_tegra_ofdata_to_platdata(struct udevice *dev)
+static int pci_tegra_of_to_plat(struct udevice *dev)
{
struct tegra_pcie *pcie = dev_get_priv(dev);
enum tegra_pci_id id;
@@ -1197,7 +1197,7 @@
.id = UCLASS_PCI,
.of_match = pci_tegra_ids,
.ops = &pci_tegra_ops,
- .ofdata_to_platdata = pci_tegra_ofdata_to_platdata,
+ .of_to_plat = pci_tegra_of_to_plat,
.probe = pci_tegra_probe,
.priv_auto = sizeof(struct tegra_pcie),
};
diff --git a/drivers/pci/pcie_brcmstb.c b/drivers/pci/pcie_brcmstb.c
index 8f084df..dd2a4ef 100644
--- a/drivers/pci/pcie_brcmstb.c
+++ b/drivers/pci/pcie_brcmstb.c
@@ -579,7 +579,7 @@
return 0;
}
-static int brcm_pcie_ofdata_to_platdata(struct udevice *dev)
+static int brcm_pcie_of_to_plat(struct udevice *dev)
{
struct brcm_pcie *pcie = dev_get_priv(dev);
ofnode dn = dev_ofnode(dev);
@@ -618,6 +618,6 @@
.ops = &brcm_pcie_ops,
.of_match = brcm_pcie_ids,
.probe = brcm_pcie_probe,
- .ofdata_to_platdata = brcm_pcie_ofdata_to_platdata,
+ .of_to_plat = brcm_pcie_of_to_plat,
.priv_auto = sizeof(struct brcm_pcie),
};
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index def5fe2..a5044ca 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -535,7 +535,7 @@
}
/**
- * pcie_dw_mvebu_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_dw_mvebu_of_to_plat() - Translate from DT to device state
*
* @dev: A pointer to the device being operated on
*
@@ -545,7 +545,7 @@
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_dw_mvebu_ofdata_to_platdata(struct udevice *dev)
+static int pcie_dw_mvebu_of_to_plat(struct udevice *dev)
{
struct pcie_dw_mvebu *pcie = dev_get_priv(dev);
@@ -578,7 +578,7 @@
.id = UCLASS_PCI,
.of_match = pcie_dw_mvebu_ids,
.ops = &pcie_dw_mvebu_ops,
- .ofdata_to_platdata = pcie_dw_mvebu_ofdata_to_platdata,
+ .of_to_plat = pcie_dw_mvebu_of_to_plat,
.probe = pcie_dw_mvebu_probe,
.priv_auto = sizeof(struct pcie_dw_mvebu),
};
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index a4867dc..7b3bb70 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -671,7 +671,7 @@
}
/**
- * pcie_dw_ti_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_dw_ti_of_to_plat() - Translate from DT to device state
*
* @dev: A pointer to the device being operated on
*
@@ -681,7 +681,7 @@
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_dw_ti_ofdata_to_platdata(struct udevice *dev)
+static int pcie_dw_ti_of_to_plat(struct udevice *dev)
{
struct pcie_dw_ti *pcie = dev_get_priv(dev);
@@ -724,7 +724,7 @@
.id = UCLASS_PCI,
.of_match = pcie_dw_ti_ids,
.ops = &pcie_dw_ti_ops,
- .ofdata_to_platdata = pcie_dw_ti_ofdata_to_platdata,
+ .of_to_plat = pcie_dw_ti_of_to_plat,
.probe = pcie_dw_ti_probe,
.priv_auto = sizeof(struct pcie_dw_ti),
};
diff --git a/drivers/pci/pcie_ecam_generic.c b/drivers/pci/pcie_ecam_generic.c
index fe71455..abba9cb 100644
--- a/drivers/pci/pcie_ecam_generic.c
+++ b/drivers/pci/pcie_ecam_generic.c
@@ -113,7 +113,7 @@
}
/**
- * pci_generic_ecam_ofdata_to_platdata() - Translate from DT to device state
+ * pci_generic_ecam_of_to_plat() - Translate from DT to device state
* @dev: A pointer to the device being operated on
*
* Translate relevant data from the device tree pertaining to device @dev into
@@ -122,7 +122,7 @@
*
* Return: 0 on success, else -EINVAL
*/
-static int pci_generic_ecam_ofdata_to_platdata(struct udevice *dev)
+static int pci_generic_ecam_of_to_plat(struct udevice *dev)
{
struct generic_ecam_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
@@ -167,6 +167,6 @@
.of_match = pci_generic_ecam_ids,
.ops = &pci_generic_ecam_ops,
.probe = pci_generic_ecam_probe,
- .ofdata_to_platdata = pci_generic_ecam_ofdata_to_platdata,
+ .of_to_plat = pci_generic_ecam_of_to_plat,
.priv_auto = sizeof(struct generic_ecam_pcie),
};
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index 52387d8..2bb91ce 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -593,7 +593,7 @@
return 0;
}
-static int fsl_pcie_ofdata_to_platdata(struct udevice *dev)
+static int fsl_pcie_of_to_plat(struct udevice *dev)
{
struct fsl_pcie *pcie = dev_get_priv(dev);
struct fsl_pcie_data *info;
@@ -661,7 +661,7 @@
.id = UCLASS_PCI,
.of_match = fsl_pcie_ids,
.ops = &fsl_pcie_ops,
- .ofdata_to_platdata = fsl_pcie_ofdata_to_platdata,
+ .of_to_plat = fsl_pcie_of_to_plat,
.probe = fsl_pcie_probe,
.priv_auto = sizeof(struct fsl_pcie),
};
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index ebf9b88..d9c2325 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -799,7 +799,7 @@
return 0;
}
-static int imx_pcie_ofdata_to_platdata(struct udevice *dev)
+static int imx_pcie_of_to_plat(struct udevice *dev)
{
struct imx_pcie_priv *priv = dev_get_priv(dev);
@@ -829,7 +829,7 @@
.ops = &imx_pcie_ops,
.probe = imx_pcie_dm_probe,
.remove = imx_pcie_dm_remove,
- .ofdata_to_platdata = imx_pcie_ofdata_to_platdata,
+ .of_to_plat = imx_pcie_of_to_plat,
.priv_auto = sizeof(struct imx_pcie_priv),
.flags = DM_FLAG_OS_PREPARE,
};
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 0a70c71..b5092e6 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -379,7 +379,7 @@
return 0;
}
-static int pcie_intel_fpga_ofdata_to_platdata(struct udevice *dev)
+static int pcie_intel_fpga_of_to_plat(struct udevice *dev)
{
struct intel_fpga_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
@@ -428,7 +428,7 @@
.id = UCLASS_PCI,
.of_match = pcie_intel_fpga_ids,
.ops = &pcie_intel_fpga_ops,
- .ofdata_to_platdata = pcie_intel_fpga_ofdata_to_platdata,
+ .of_to_plat = pcie_intel_fpga_of_to_plat,
.probe = pcie_intel_fpga_probe,
.priv_auto = sizeof(struct intel_fpga_pcie),
};
diff --git a/drivers/pci/pcie_phytium.c b/drivers/pci/pcie_phytium.c
index cce7871..03ea04c 100644
--- a/drivers/pci/pcie_phytium.c
+++ b/drivers/pci/pcie_phytium.c
@@ -147,7 +147,7 @@
}
/**
- * pci_phytium_ofdata_to_platdata() - Translate from DT to device state
+ * pci_phytium_of_to_plat() - Translate from DT to device state
* @dev: A pointer to the device being operated on
*
* Translate relevant data from the device tree pertaining to device @dev into
@@ -156,7 +156,7 @@
*
* Return: 0 on success, else -EINVAL
*/
-static int pci_phytium_ofdata_to_platdata(struct udevice *dev)
+static int pci_phytium_of_to_plat(struct udevice *dev)
{
struct phytium_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
@@ -194,6 +194,6 @@
.id = UCLASS_PCI,
.of_match = pci_phytium_ids,
.ops = &pci_phytium_ops,
- .ofdata_to_platdata = pci_phytium_ofdata_to_platdata,
+ .of_to_plat = pci_phytium_of_to_plat,
.priv_auto = sizeof(struct phytium_pcie),
};
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 7aaee77..00879a2 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -129,7 +129,7 @@
}
/**
- * pcie_xilinx_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_xilinx_of_to_plat() - Translate from DT to device state
* @dev: A pointer to the device being operated on
*
* Translate relevant data from the device tree pertaining to device @dev into
@@ -138,7 +138,7 @@
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_xilinx_ofdata_to_platdata(struct udevice *dev)
+static int pcie_xilinx_of_to_plat(struct udevice *dev)
{
struct xilinx_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
@@ -174,6 +174,6 @@
.id = UCLASS_PCI,
.of_match = pcie_xilinx_ids,
.ops = &pcie_xilinx_ops,
- .ofdata_to_platdata = pcie_xilinx_ofdata_to_platdata,
+ .of_to_plat = pcie_xilinx_of_to_plat,
.priv_auto = sizeof(struct xilinx_pcie),
};