usb: dwc3: store driver data earlier
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 13 May 2015 12:26:45 +0000 (15:26 +0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 13 May 2015 17:05:56 +0000 (12:05 -0500)
We need to store it before phys are handled, so we can later
use it in ULPI interface support code.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c

index 2bbab3d86fffe7437100f4757d42d174e51f5928..c7734edd40f8d425c1610a22793be13fcc411801 100644 (file)
@@ -875,12 +875,13 @@ static int dwc3_probe(struct platform_device *pdev)
        dwc->hird_threshold = hird_threshold
                | (dwc->is_utmi_l1_suspend << 4);
 
+       platform_set_drvdata(pdev, dwc);
+
        ret = dwc3_core_get_phy(dwc);
        if (ret)
                goto err0;
 
        spin_lock_init(&dwc->lock);
-       platform_set_drvdata(pdev, dwc);
 
        if (!dev->dma_mask) {
                dev->dma_mask = dev->parent->dma_mask;