mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
rk30: hdmi: unregister earlysuspend when shutdown
This commit is contained in:
@@ -198,6 +198,7 @@ err1:
|
||||
err0:
|
||||
hdmi_dbg(hdmi->dev, "rk30 hdmi probe error.\n");
|
||||
kfree(hdmi);
|
||||
hdmi = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -221,7 +222,18 @@ static int __devexit rk30_hdmi_remove(struct platform_device *pdev)
|
||||
|
||||
static void rk30_hdmi_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
/* this func is called twice, bug? */
|
||||
static bool first = true;
|
||||
|
||||
if (first) {
|
||||
first = false;
|
||||
return;
|
||||
}
|
||||
if (!hdmi)
|
||||
return;
|
||||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
unregister_early_suspend(&hdmi->early_suspend);
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct platform_driver rk30_hdmi_driver = {
|
||||
@@ -247,4 +259,4 @@ static void __exit rk30_hdmi_exit(void)
|
||||
|
||||
//fs_initcall(rk30_hdmi_init);
|
||||
module_init(rk30_hdmi_init);
|
||||
module_exit(rk30_hdmi_exit);
|
||||
module_exit(rk30_hdmi_exit);
|
||||
|
||||
@@ -60,8 +60,8 @@ struct hdmi {
|
||||
int wait;
|
||||
struct completion complete;
|
||||
|
||||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
int suspend;
|
||||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
struct early_suspend early_suspend;
|
||||
#endif
|
||||
|
||||
@@ -93,4 +93,4 @@ extern int hdmi_find_best_mode(struct hdmi* hdmi, int vic);
|
||||
extern int hdmi_ouputmode_select(struct hdmi *hdmi, int edid_ok);
|
||||
extern int hdmi_switch_fb(struct hdmi *hdmi, int vic);
|
||||
extern void hdmi_sys_remove(void);
|
||||
#endif /* __RK30_HDMI_H__ */
|
||||
#endif /* __RK30_HDMI_H__ */
|
||||
|
||||
Reference in New Issue
Block a user