diff options
author | make shi <b15407@freescale.com> | 2012-11-08 15:50:20 +0800 |
---|---|---|
committer | make shi <b15407@freescale.com> | 2012-11-14 17:52:19 +0800 |
commit | 649363219c76a2c91db7df3effeb61ba201c560c (patch) | |
tree | 1e3858f756bcae1f59a8d7ff1c1d703eed392f81 /drivers/usb | |
parent | b8ee7558dca70f7db6a93c0d18d8c7a2bf87476b (diff) |
ENGR00233051-04 Mx6 USB: driver implementation for OTG modulization
- reset fsl_otg_dev to NULL after kfree
- remove __exit_p prefix to make sure fsl_udc_remove is called when
module unload
Signed-off-by: make shi <b15407@freescale.com>
Diffstat (limited to 'drivers/usb')
-rwxr-xr-x | drivers/usb/gadget/arcotg_udc.c | 4 | ||||
-rwxr-xr-x | drivers/usb/otg/fsl_otg.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c index 127e92996ddf..ae0daac1f2ef 100755 --- a/drivers/usb/gadget/arcotg_udc.c +++ b/drivers/usb/gadget/arcotg_udc.c @@ -3245,7 +3245,7 @@ err1a: /* Driver removal function * Free resources and finish pending transactions */ -static int __exit fsl_udc_remove(struct platform_device *pdev) +static int fsl_udc_remove(struct platform_device *pdev) { struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; @@ -3529,7 +3529,7 @@ end: --------------------------------------------------------------------------*/ static struct platform_driver udc_driver = { - .remove = __exit_p(fsl_udc_remove), + .remove = fsl_udc_remove, /* these suspend and resume are not usb suspend and resume */ .suspend = fsl_udc_suspend, .resume = fsl_udc_resume, diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index 4205ed9aaec9..d728cf92457d 100755 --- a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c @@ -1398,6 +1398,7 @@ static int fsl_otg_remove(struct platform_device *pdev) kfree(fsl_otg_dev); + fsl_otg_dev = NULL; remove_proc_file(); unregister_chrdev(FSL_OTG_MAJOR, FSL_OTG_NAME); |