Commit 64936321 authored by make shi's avatar make shi

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: default avatarmake shi <b15407@freescale.com>
parent b8ee7558
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment