diff options
author | make shi <b15407@freescale.com> | 2011-11-08 14:54:28 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2011-12-01 11:36:19 +0800 |
commit | 70603a7cf6f203ca7e59a7c3ced3d9cf8d4de90c (patch) | |
tree | 17b9d7d715f1d47a0caf85fc6ac75a6b0d59ee39 /arch | |
parent | c1616f7b48c6a7ad91d74765d5e165d8361f6d9b (diff) |
ENGR00161598 [MX6]OTG driver: load fail issue
[MX6] OTG load fail when remove all usb module
Signed-off-by: make shi <b15407@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx6/usb_dr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-mx6/usb_dr.c b/arch/arm/mach-mx6/usb_dr.c index f498d6e94cc..de84a4ded23 100644 --- a/arch/arm/mach-mx6/usb_dr.c +++ b/arch/arm/mach-mx6/usb_dr.c @@ -141,12 +141,12 @@ static int usbotg_init_ext(struct platform_device *pdev) if (!otg_used) { usbotg_internal_phy_clock_gate(true); usb_phy_enable(pdev->dev.platform_data); - otg_used++; /*after the phy reset,can not read the readingvalue for id/vbus at * the register of otgsc ,cannot read at once ,need delay 3 ms */ mdelay(3); } + otg_used++; return ret; } @@ -457,8 +457,9 @@ void __init mx6_usb_dr_init(void) #endif /* register wakeup device */ pdev_wakeup = imx6q_add_fsl_usb2_otg_wakeup(&dr_wakeup_config); - ((struct fsl_usb2_platform_data *)(pdev->dev.platform_data))->wakeup_pdata = - (struct fsl_usb2_wakeup_platform_data *)(pdev_wakeup->dev.platform_data); + if (pdev != NULL) + ((struct fsl_usb2_platform_data *)(pdev->dev.platform_data))->wakeup_pdata = + (struct fsl_usb2_wakeup_platform_data *)(pdev_wakeup->dev.platform_data); /* Some phy and power's special controls for otg * 1. The external charger detector needs to be disabled |