From 0d857ed7bb1dfb0d8e56fe709950af334473f4fa Mon Sep 17 00:00:00 2001 From: Zheng Yang <zhengyang@rock-chips.com> Date: Thu, 31 May 2012 15:02:14 +0800 Subject: [PATCH] rk30 hdmi: only unregister earlysuspend when shutdown. --- drivers/video/rockchip/hdmi/rk30_hdmi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/video/rockchip/hdmi/rk30_hdmi.c b/drivers/video/rockchip/hdmi/rk30_hdmi.c index 2272ca86883f..37ab8575b758 100755 --- a/drivers/video/rockchip/hdmi/rk30_hdmi.c +++ b/drivers/video/rockchip/hdmi/rk30_hdmi.c @@ -219,6 +219,15 @@ static int __devexit rk30_hdmi_remove(struct platform_device *pdev) iounmap((void*)hdmi->regbase); // release_mem_region(res->start,(res->end - res->start) + 1); clk_disable(hdmi->hclk); + fb_destroy_modelist(&hdmi->edid.modelist); + if(hdmi->edid.audio) + kfree(hdmi->edid.audio); + if(hdmi->edid.specs) + { + if(hdmi->edid.specs->modedb) + kfree(hdmi->edid.specs->modedb); + kfree(hdmi->edid.specs); + } kfree(hdmi); hdmi = NULL; } @@ -229,18 +238,9 @@ static int __devexit rk30_hdmi_remove(struct platform_device *pdev) static void rk30_hdmi_shutdown(struct platform_device *pdev) { if(hdmi) { - flush_workqueue(hdmi->workqueue); - destroy_workqueue(hdmi->workqueue); - #ifdef CONFIG_SWITCH - switch_dev_unregister(&(hdmi->switch_hdmi)); - #endif - hdmi_unregister_display_sysfs(hdmi); #ifdef CONFIG_HAS_EARLYSUSPEND unregister_early_suspend(&hdmi->early_suspend); #endif - clk_disable(hdmi->hclk); - kfree(hdmi); - hdmi = NULL; } printk(KERN_INFO "rk30 hdmi shut down.\n"); } -- 2.34.1