It will cause below problem if spin_lock debug is on:
BUG: spinlock lockup on CPU#0, swapper/1,
9a0292a0
The reason is the lock is used before initialization.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
goto err2a;
}
+ spin_lock_init(&pdata->lock);
+
/* Due to mx35/mx25's phy's bug */
reset_phy();
udc_controller->charger.enable = false;
#endif
- spin_lock_init(&pdata->lock);
return 0;
err4:
goto err4;
}
+ spin_lock_init(&pdata->lock);
+
fsl_platform_set_host_mode(hcd);
hcd->power_budget = pdata->power_budget;
ehci = hcd_to_ehci(hcd);
ehci = hcd_to_ehci(hcd);
pdata->pm_command = ehci->command;
- spin_lock_init(&pdata->lock);
return retval;
err6:
free_irq(irq, (void *)pdev);