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/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 0bfdaa0..459add8 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -105,7 +105,7 @@
return 0;
}
-static int dwc3_generic_ofdata_to_platdata(struct udevice *dev)
+static int dwc3_generic_of_to_plat(struct udevice *dev)
{
struct dwc3_generic_plat *plat = dev_get_plat(dev);
ofnode node = dev->node;
@@ -155,7 +155,7 @@
U_BOOT_DRIVER(dwc3_generic_peripheral) = {
.name = "dwc3-generic-peripheral",
.id = UCLASS_USB_GADGET_GENERIC,
- .ofdata_to_platdata = dwc3_generic_ofdata_to_platdata,
+ .of_to_plat = dwc3_generic_of_to_plat,
.probe = dwc3_generic_peripheral_probe,
.remove = dwc3_generic_peripheral_remove,
.priv_auto = sizeof(struct dwc3_generic_priv),
@@ -197,7 +197,7 @@
U_BOOT_DRIVER(dwc3_generic_host) = {
.name = "dwc3-generic-host",
.id = UCLASS_USB,
- .ofdata_to_platdata = dwc3_generic_ofdata_to_platdata,
+ .of_to_plat = dwc3_generic_of_to_plat,
.probe = dwc3_generic_host_probe,
.remove = dwc3_generic_host_remove,
.priv_auto = sizeof(struct dwc3_generic_host_priv),
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 67c2320..edabc1b3 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -366,7 +366,7 @@
return 0;
}
-static int sandbox_flash_ofdata_to_platdata(struct udevice *dev)
+static int sandbox_flash_of_to_plat(struct udevice *dev)
{
struct sandbox_flash_plat *plat = dev_get_plat(dev);
@@ -419,7 +419,7 @@
.of_match = sandbox_usb_flash_ids,
.bind = sandbox_flash_bind,
.probe = sandbox_flash_probe,
- .ofdata_to_platdata = sandbox_flash_ofdata_to_platdata,
+ .of_to_plat = sandbox_flash_of_to_plat,
.ops = &sandbox_usb_flash_ops,
.priv_auto = sizeof(struct sandbox_flash_priv),
.plat_auto = sizeof(struct sandbox_flash_plat),
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 2d5b7dc..4771b1e 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -980,7 +980,7 @@
generic_phy_exit_bulk(phys);
}
-static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev)
+static int dwc2_udc_otg_of_to_plat(struct udevice *dev)
{
struct dwc2_plat_otg_data *plat = dev_get_plat(dev);
ulong drvdata;
@@ -1185,7 +1185,7 @@
.name = "dwc2-udc-otg",
.id = UCLASS_USB_GADGET_GENERIC,
.of_match = dwc2_udc_otg_ids,
- .ofdata_to_platdata = dwc2_udc_otg_ofdata_to_platdata,
+ .of_to_plat = dwc2_udc_otg_of_to_plat,
.probe = dwc2_udc_otg_probe,
.remove = dwc2_udc_otg_remove,
.plat_auto = sizeof(struct dwc2_plat_otg_data),
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 40d389c..ec643e9 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -1326,7 +1326,7 @@
nonblock);
}
-static int dwc2_usb_ofdata_to_platdata(struct udevice *dev)
+static int dwc2_usb_of_to_plat(struct udevice *dev)
{
struct dwc2_priv *priv = dev_get_priv(dev);
@@ -1473,7 +1473,7 @@
.name = "dwc2_usb",
.id = UCLASS_USB,
.of_match = dwc2_usb_ids,
- .ofdata_to_platdata = dwc2_usb_ofdata_to_platdata,
+ .of_to_plat = dwc2_usb_of_to_plat,
.probe = dwc2_usb_probe,
.remove = dwc2_usb_remove,
.ops = &dwc2_usb_ops,
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index 90266c7..660a145 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -100,7 +100,7 @@
setbits_le32(plat->glue_base + CLKRST_CTRL, SW_PIPEW_RESET_N);
}
-static int sti_dwc3_glue_ofdata_to_platdata(struct udevice *dev)
+static int sti_dwc3_glue_of_to_plat(struct udevice *dev)
{
struct sti_dwc3_glue_platdata *plat = dev_get_plat(dev);
struct udevice *syscon;
@@ -242,7 +242,7 @@
.name = "dwc3_sti_glue",
.id = UCLASS_NOP,
.of_match = sti_dwc3_glue_ids,
- .ofdata_to_platdata = sti_dwc3_glue_ofdata_to_platdata,
+ .of_to_plat = sti_dwc3_glue_of_to_plat,
.probe = sti_dwc3_glue_probe,
.remove = sti_dwc3_glue_remove,
.bind = sti_dwc3_glue_bind,
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index 0a3983b..690a96c 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -43,7 +43,7 @@
struct ehci_hccr *hcd;
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct exynos_ehci_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
@@ -254,7 +254,7 @@
.name = "ehci_exynos",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_usb_remove,
.ops = &ehci_usb_ops,
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 9824b7b..dfeca89 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -58,7 +58,7 @@
}
#if CONFIG_IS_ENABLED(DM_USB)
-static int ehci_fsl_ofdata_to_platdata(struct udevice *dev)
+static int ehci_fsl_of_to_plat(struct udevice *dev)
{
struct ehci_fsl_priv *priv = dev_get_priv(dev);
const void *prop;
@@ -141,7 +141,7 @@
.name = "ehci_fsl",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_fsl_ofdata_to_platdata,
+ .of_to_plat = ehci_fsl_of_to_plat,
.probe = ehci_fsl_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 6143de2..a3405d0 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -101,7 +101,7 @@
return 0;
}
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct msm_ehci_priv *priv = dev_get_priv(dev);
@@ -140,7 +140,7 @@
.name = "ehci_msm",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_usb_remove,
.ops = &ehci_usb_ops,
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 717ef68..970bbe9 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -285,7 +285,7 @@
.powerup_fixup = mx5_ehci_powerup_fixup,
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_plat(dev);
const char *mode;
@@ -363,7 +363,7 @@
.name = "ehci_mx5",
.id = UCLASS_USB,
.of_match = mx5_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 53f0e49..628081a 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -518,7 +518,7 @@
return 0;
}
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_plat(dev);
enum usb_dr_mode dr_mode;
@@ -645,7 +645,7 @@
.name = "ehci_mx6",
.id = UCLASS_USB,
.of_match = mx6_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.bind = ehci_usb_bind,
.probe = ehci_usb_probe,
.remove = ehci_deregister,
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 0ca20a9..58a9a1d 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -366,7 +366,7 @@
int nports;
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_plat(dev);
@@ -402,7 +402,7 @@
.id = UCLASS_USB,
.of_match = omap_ehci_dt_ids,
.probe = omap_ehci_probe,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.plat_auto = sizeof(struct usb_platdata),
.priv_auto = sizeof(struct ehci_omap_priv_data),
.remove = ehci_deregister,
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 68a4904..c16eec3 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -812,7 +812,7 @@
.powerup_fixup = tegra_ehci_powerup_fixup,
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct fdt_usb *priv = dev_get_priv(dev);
int ret;
@@ -861,7 +861,7 @@
.name = "ehci_tegra",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index e311282..a517c61 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -215,7 +215,7 @@
u32 portnr;
};
-static int vf_usb_ofdata_to_platdata(struct udevice *dev)
+static int vf_usb_of_to_plat(struct udevice *dev)
{
struct ehci_vf_priv_data *priv = dev_get_priv(dev);
const void *dt_blob = gd->fdt_blob;
@@ -354,7 +354,7 @@
.probe = ehci_usb_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
- .ofdata_to_platdata = vf_usb_ofdata_to_platdata,
+ .of_to_plat = vf_usb_of_to_plat,
.plat_auto = sizeof(struct usb_platdata),
.priv_auto = sizeof(struct ehci_vf_priv_data),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c
index 7a7cfaa..6756465 100644
--- a/drivers/usb/host/ehci-zynq.c
+++ b/drivers/usb/host/ehci-zynq.c
@@ -21,7 +21,7 @@
struct usb_ehci *ehci;
};
-static int ehci_zynq_ofdata_to_platdata(struct udevice *dev)
+static int ehci_zynq_of_to_plat(struct udevice *dev)
{
struct zynq_ehci_priv *priv = dev_get_priv(dev);
@@ -81,7 +81,7 @@
.name = "ehci_zynq",
.id = UCLASS_USB,
.of_match = ehci_zynq_ids,
- .ofdata_to_platdata = ehci_zynq_ofdata_to_platdata,
+ .of_to_plat = ehci_zynq_of_to_plat,
.probe = ehci_zynq_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 7620ac2..f1fc93f 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -805,7 +805,7 @@
return ret;
}
-static int r8a66597_usb_ofdata_to_platdata(struct udevice *dev)
+static int r8a66597_usb_of_to_plat(struct udevice *dev)
{
struct r8a66597 *priv = dev_get_priv(dev);
fdt_addr_t addr;
@@ -890,7 +890,7 @@
.name = "r8a66597_usb",
.id = UCLASS_USB,
.of_match = r8a66597_usb_ids,
- .ofdata_to_platdata = r8a66597_usb_ofdata_to_platdata,
+ .of_to_plat = r8a66597_usb_of_to_plat,
.probe = r8a66597_usb_probe,
.remove = r8a66597_usb_remove,
.ops = &r8a66597_usb_ops,
diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c
index 4d3dd36..fe804a0 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -52,7 +52,7 @@
struct dwc3 *dwc3_reg;
};
-static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
+static int xhci_usb_of_to_plat(struct udevice *dev)
{
struct exynos_xhci_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
@@ -251,7 +251,7 @@
.name = "xhci_exynos",
.id = UCLASS_USB,
.of_match = xhci_usb_ids,
- .ofdata_to_platdata = xhci_usb_ofdata_to_platdata,
+ .of_to_plat = xhci_usb_of_to_plat,
.probe = xhci_usb_probe,
.remove = xhci_usb_remove,
.ops = &xhci_usb_ops,
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index ffecfc2..017f99b 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -65,7 +65,7 @@
return xhci_register(dev, ctx->hcd, hcor);
}
-static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
+static int xhci_usb_of_to_plat(struct udevice *dev)
{
struct mvebu_xhci_platdata *plat = dev_get_plat(dev);
@@ -92,7 +92,7 @@
.name = "xhci_mvebu",
.id = UCLASS_USB,
.of_match = xhci_usb_ids,
- .ofdata_to_platdata = xhci_usb_ofdata_to_platdata,
+ .of_to_plat = xhci_usb_of_to_plat,
.probe = xhci_usb_probe,
.remove = xhci_deregister,
.ops = &xhci_usb_ops,
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index 22dfaf4..dc941a2 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -132,7 +132,7 @@
return ret;
}
-static int xhci_rcar_ofdata_to_platdata(struct udevice *dev)
+static int xhci_rcar_of_to_plat(struct udevice *dev)
{
struct rcar_xhci_platdata *plat = dev_get_plat(dev);
@@ -160,7 +160,7 @@
.remove = xhci_rcar_deregister,
.ops = &xhci_usb_ops,
.of_match = xhci_rcar_ids,
- .ofdata_to_platdata = xhci_rcar_ofdata_to_platdata,
+ .of_to_plat = xhci_rcar_of_to_plat,
.plat_auto = sizeof(struct rcar_xhci_platdata),
.priv_auto = sizeof(struct rcar_xhci),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index d9591b9..c59ca54 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -256,7 +256,7 @@
struct phy phy;
};
-static int da8xx_musb_ofdata_to_platdata(struct udevice *dev)
+static int da8xx_musb_of_to_plat(struct udevice *dev)
{
struct da8xx_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
@@ -344,7 +344,7 @@
.name = "da8xx-musb",
.id = UCLASS_USB,
.of_match = da8xx_musb_ids,
- .ofdata_to_platdata = da8xx_musb_ofdata_to_platdata,
+ .of_to_plat = da8xx_musb_of_to_plat,
.probe = da8xx_musb_probe,
.remove = da8xx_musb_remove,
.ops = &musb_usb_ops,
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index b09f0d4..b9bba22 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -149,7 +149,7 @@
struct omap_musb_board_data otg_board_data;
};
-static int omap2430_musb_ofdata_to_platdata(struct udevice *dev)
+static int omap2430_musb_of_to_plat(struct udevice *dev)
{
struct omap2430_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
@@ -269,7 +269,7 @@
.id = UCLASS_USB_GADGET_GENERIC,
#endif
.of_match = omap2430_musb_ids,
- .ofdata_to_platdata = omap2430_musb_ofdata_to_platdata,
+ .of_to_plat = omap2430_musb_of_to_plat,
.probe = omap2430_musb_probe,
.remove = omap2430_musb_remove,
#ifdef CONFIG_USB_MUSB_HOST
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 716e820..b0ee57a 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -77,7 +77,7 @@
return -ENOENT;
}
-static int ti_musb_ofdata_to_platdata(struct udevice *dev)
+static int ti_musb_of_to_plat(struct udevice *dev)
{
struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
@@ -176,14 +176,14 @@
}
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int ti_musb_host_ofdata_to_platdata(struct udevice *dev)
+static int ti_musb_host_of_to_plat(struct udevice *dev)
{
struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int ret;
- ret = ti_musb_ofdata_to_platdata(dev);
+ ret = ti_musb_of_to_plat(dev);
if (ret) {
pr_err("plat dt parse error\n");
return ret;
@@ -199,7 +199,7 @@
.name = "ti-musb-host",
.id = UCLASS_USB,
#if CONFIG_IS_ENABLED(OF_CONTROL)
- .ofdata_to_platdata = ti_musb_host_ofdata_to_platdata,
+ .of_to_plat = ti_musb_host_of_to_plat,
#endif
.probe = ti_musb_host_probe,
.remove = ti_musb_host_remove,
@@ -214,14 +214,14 @@
};
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int ti_musb_peripheral_ofdata_to_platdata(struct udevice *dev)
+static int ti_musb_peripheral_of_to_plat(struct udevice *dev)
{
struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int ret;
- ret = ti_musb_ofdata_to_platdata(dev);
+ ret = ti_musb_of_to_plat(dev);
if (ret) {
pr_err("plat dt parse error\n");
return ret;
@@ -272,7 +272,7 @@
.name = "ti-musb-peripheral",
.id = UCLASS_USB_GADGET_GENERIC,
#if CONFIG_IS_ENABLED(OF_CONTROL)
- .ofdata_to_platdata = ti_musb_peripheral_ofdata_to_platdata,
+ .of_to_plat = ti_musb_peripheral_of_to_plat,
#endif
.probe = ti_musb_peripheral_probe,
.remove = ti_musb_peripheral_remove,