]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00233051-04 Mx6 USB: driver implementation for OTG modulization
authormake shi <b15407@freescale.com>
Thu, 8 Nov 2012 07:50:20 +0000 (15:50 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:42 +0000 (08:35 +0200)
- 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>
drivers/usb/gadget/arcotg_udc.c
drivers/usb/otg/fsl_otg.c

index 127e92996ddf287afce1fcaf0457a9d363e1f065..ae0daac1f2ef5d90048f426be2e8f7f7db17134a 100755 (executable)
@@ -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,
index 4205ed9aaec9437dbb42557ee2385c7738558649..d728cf92457d327232ad397f526ec168048d5c70 100755 (executable)
@@ -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);