Hello.

On 13-07-2012 7:54, Ming Lei wrote:

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 <st...@rowland.harvard.edu>
Signed-off-by: Ming Lei <ming....@canonical.com>
---
  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);

First, you don't describe this change. Second, 'driver_data' and 'platform_data' fields is not the same, are you sure this change is correct. The declaration of 'pdata' suggests that it should be
'platform_data'.

WBR, Sergei
--
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