[PATCH -next] USB: ehci-omap: fix compile failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The omap_ehci_init() is introduced in the below commit:

	commit 1a49e2ac9651df7349867a5cf44e2c83de1046af(EHCI:
	centralize controller initialization)

the local variable of 'pdev' inside omap_ehci_init() is used
but not defined, so fix the bug.

Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxxxxx>
---
 drivers/usb/host/ehci-omap.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 6133d93..4c43681 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -150,8 +150,10 @@ static int omap_ehci_init(struct usb_hcd *hcd)
 	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 	int			rc;
 	struct ehci_hcd_omap_platform_data	*pdata;
+	struct platform_device *pdev =
+		to_platform_device(hcd->self.controller);
 
-	pdata = hcd->self.controller->platform_data;
+	pdata = platform_get_drvdata(pdev);
 	if (pdata->phy_reset) {
 		if (gpio_is_valid(pdata->reset_gpio_port[0]))
 			gpio_request_one(pdata->reset_gpio_port[0],
-- 
1.7.9.5

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux