lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 30 Oct 2014 12:36:47 +0100
From:	Antoine Tenart <antoine.tenart@...e-electrons.com>
To:	Peter.Chen@...escale.com
Cc:	Antoine Tenart <antoine.tenart@...e-electrons.com>,
	alexandre.belloni@...e-electrons.com,
	thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
	jszhang@...vell.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 6/6] usb: chipidea: remove obsolete ci_get_platdata function

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.tenart@...e-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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ