err0:\r
hdmi_dbg(hdmi->dev, "rk30 hdmi probe error.\n");\r
kfree(hdmi);\r
+ hdmi = NULL;\r
return ret;\r
}\r
\r
\r
static void rk30_hdmi_shutdown(struct platform_device *pdev)\r
{\r
+ /* this func is called twice, bug? */\r
+ static bool first = true;\r
\r
+ if (first) {\r
+ first = false;\r
+ return;\r
+ }\r
+ if (!hdmi)\r
+ return;\r
+#ifdef CONFIG_HAS_EARLYSUSPEND\r
+ unregister_early_suspend(&hdmi->early_suspend);\r
+#endif\r
}\r
\r
static struct platform_driver rk30_hdmi_driver = {\r
\r
//fs_initcall(rk30_hdmi_init);\r
module_init(rk30_hdmi_init);\r
-module_exit(rk30_hdmi_exit);
\ No newline at end of file
+module_exit(rk30_hdmi_exit);\r
int wait;
struct completion complete;
-#ifdef CONFIG_HAS_EARLYSUSPEND
int suspend;
+#ifdef CONFIG_HAS_EARLYSUSPEND
struct early_suspend early_suspend;
#endif
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__ */
\ No newline at end of file
+#endif /* __RK30_HDMI_H__ */