The addition of the ci_hdrc_get_platdata function makes the use of
ci_get_platdata obsolete. Remove it.

Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com>
---
 drivers/usb/chipidea/core.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 0ad55c10a903..8562a9c6154d 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -498,43 +498,6 @@ static irqreturn_t ci_irq(int irq, void *data)
        return ret;
 }
 
-static int ci_get_platdata(struct device *dev,
-               struct ci_hdrc_platform_data *platdata)
-{
-       if (!platdata->phy_mode)
-               platdata->phy_mode = of_usb_get_phy_mode(dev->of_node);
-
-       if (!platdata->dr_mode)
-               platdata->dr_mode = of_usb_get_dr_mode(dev->of_node);
-
-       if (platdata->dr_mode == USB_DR_MODE_UNKNOWN)
-               platdata->dr_mode = USB_DR_MODE_OTG;
-
-       if (platdata->dr_mode != USB_DR_MODE_PERIPHERAL) {
-               /* Get the vbus regulator */
-               platdata->reg_vbus = devm_regulator_get(dev, "vbus");
-               if (PTR_ERR(platdata->reg_vbus) == -EPROBE_DEFER) {
-                       return -EPROBE_DEFER;
-               } else if (PTR_ERR(platdata->reg_vbus) == -ENODEV) {
-                       /* no vbus regualator is needed */
-                       platdata->reg_vbus = NULL;
-               } else if (IS_ERR(platdata->reg_vbus)) {
-                       dev_err(dev, "Getting regulator error: %ld\n",
-                               PTR_ERR(platdata->reg_vbus));
-                       return PTR_ERR(platdata->reg_vbus);
-               }
-               /* Get TPL support */
-               if (!platdata->tpl_support)
-                       platdata->tpl_support =
-                               of_usb_host_tpl_support(dev->of_node);
-       }
-
-       if (of_usb_get_maximum_speed(dev->of_node) == USB_SPEED_FULL)
-               platdata->flags |= CI_HDRC_FORCE_FULLSPEED;
-
-       return 0;
-}
-
 /*
  * Getting a PHY or an USB PHY is optional:
  * If no PHY or USB PHY is found, or if their subsystems aren't enabled,
@@ -673,10 +636,6 @@ struct platform_device *ci_hdrc_add_device(struct device 
*dev,
        struct platform_device *pdev;
        int id, ret;
 
-       ret = ci_get_platdata(dev, platdata);
-       if (ret)
-               return ERR_PTR(ret);
-
        id = ida_simple_get(&ci_ida, 0, 0, GFP_KERNEL);
        if (id < 0)
                return ERR_PTR(id);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to