diff mbox

[1/2] ehci-msm: Remove global struct usb_phy variable

Message ID 1381491970-22896-1-git-send-email-iivanov@mm-sol.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ivan T. Ivanov Oct. 11, 2013, 11:46 a.m. UTC
From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Use struct usb_hcd::phy to hold USB PHY instance.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/host/ehci-msm.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

David Brown Oct. 11, 2013, 2:06 p.m. UTC | #1
On Fri, Oct 11, 2013 at 02:46:09PM +0300, Ivan T. Ivanov wrote:
>From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
>Use struct usb_hcd::phy to hold USB PHY instance.
>
>Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
>---
> drivers/usb/host/ehci-msm.c |    5 +++--

Acked-by: David Brown <davidb@codeaurora.org>
diff mbox

Patch

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 0f717dc..1bc9355 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -42,7 +42,6 @@ 
 
 static const char hcd_name[] = "ehci-msm";
 static struct hc_driver __read_mostly msm_hc_driver;
-static struct usb_phy *phy;
 
 static int ehci_msm_reset(struct usb_hcd *hcd)
 {
@@ -70,6 +69,7 @@  static int ehci_msm_probe(struct platform_device *pdev)
 {
 	struct usb_hcd *hcd;
 	struct resource *res;
+	struct usb_phy *phy;
 	int ret;
 
 	dev_dbg(&pdev->dev, "ehci_msm proble\n");
@@ -121,6 +121,7 @@  static int ehci_msm_probe(struct platform_device *pdev)
 		goto put_hcd;
 	}
 
+	hcd->phy = phy;
 	device_init_wakeup(&pdev->dev, 1);
 	/*
 	 * OTG device parent of HCD takes care of putting
@@ -147,7 +148,7 @@  static int ehci_msm_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_set_suspended(&pdev->dev);
 
-	otg_set_host(phy->otg, NULL);
+	otg_set_host(hcd->phy->otg, NULL);
 
 	/* FIXME: need to call usb_remove_hcd() here? */