diff options
author | Min-wuk Lee <mlee@nvidia.com> | 2013-10-17 12:07:38 +0900 |
---|---|---|
committer | Gabby Lee <galee@nvidia.com> | 2013-10-22 22:10:29 -0700 |
commit | 19a5b58041e74b825469ebfef2ed9866fad90840 (patch) | |
tree | c6912d17ea086983cc2986b48e69a3045fc0dea1 | |
parent | 0861ce714c393ca714fb670171ac26f4e9beff01 (diff) |
tegra: video: hdmi: WAR: check hdmi validity
It is possible that hdmi and its display controller
are not used depending on hardware requirement.
This change is checking hdmi validity and if it
isn't valid, do not handle hdmi clk.
Bug 1390118
Change-Id: I1ff422c29ee7228095bf057c11e37c479555e5ab
Signed-off-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-on: http://git-master/r/300307
Reviewed-by: Youngjin Kim <nkim@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gabby Lee <galee@nvidia.com>
-rw-r--r-- | drivers/video/tegra/dc/hdmi.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index 0f98cd75acaa..fa879a51ba3b 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -474,7 +474,12 @@ static inline void tegra_hdmi_hotplug_enable(struct tegra_dc_hdmi_data *hdmi) void tegra_hdmi_enable_clk(void) { struct tegra_dc_hdmi_data *hdmi = dc_hdmi; - struct tegra_dc *dc = hdmi->dc; + struct tegra_dc *dc; + + if (!hdmi) + return; + + dc = hdmi->dc; mutex_lock(&dc->lock); clk_prepare_enable(hdmi->disp1_clk); @@ -488,7 +493,12 @@ EXPORT_SYMBOL(tegra_hdmi_enable_clk); void tegra_hdmi_disable_clk(void) { struct tegra_dc_hdmi_data *hdmi = dc_hdmi; - struct tegra_dc *dc = hdmi->dc; + struct tegra_dc *dc; + + if (!hdmi) + return; + + dc = hdmi->dc; atomic_set(&tf_hdmi_enable, 0); mutex_lock(&dc->lock); |