rk fb:stop vsync thread when rk fb shut down
authoryxj <yxj@rock-chips.com>
Fri, 1 Feb 2013 09:52:27 +0000 (17:52 +0800)
committeryxj <yxj@rock-chips.com>
Fri, 1 Feb 2013 09:57:05 +0000 (17:57 +0800)
drivers/video/rockchip/rk_fb.c

index 9ff5f6f13f48c4b3b1164ead2364003b3c2d2658..d632d8b5cefeae6965a11f68ca7e0865ccc20cb7 100644 (file)
@@ -1352,7 +1352,16 @@ static int __devexit rk_fb_remove(struct platform_device *pdev)
 
 static void rk_fb_shutdown(struct platform_device *pdev)
 {
-//     struct rk_fb_inf *fb_inf = platform_get_drvdata(pdev);
+       struct rk_fb_inf *inf = platform_get_drvdata(pdev);
+       int i;
+       for(i = 0; i < inf->num_lcdc; i++)
+       {
+               if (!inf->lcdc_dev_drv[i])
+                       continue;
+
+               if(inf->lcdc_dev_drv[i]->vsync_info.thread)
+                       kthread_stop(inf->lcdc_dev_drv[i]->vsync_info.thread);
+       }
 //     kfree(fb_inf);
 //     platform_set_drvdata(pdev, NULL);
 #ifdef CONFIG_HAS_EARLYSUSPEND