diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-05-05 18:35:11 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-05-24 08:41:36 +0200 |
commit | 81df448eb02db14128875a6cff90876b39422a6d (patch) | |
tree | 67db83ca2fd065f2c0ff8f6f024033f0f6203c5e /drivers/video/sh_mobile_hdmi.c | |
parent | Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/let... (diff) | |
download | linux-81df448eb02db14128875a6cff90876b39422a6d.tar.xz linux-81df448eb02db14128875a6cff90876b39422a6d.zip |
fbdev: sh_mobile_hdmi: runtime suspend HDMI on error and clean up paths
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_hdmi.c')
-rw-r--r-- | drivers/video/sh_mobile_hdmi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 2b9e56a6bde4..6ae40b630dc9 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -1131,15 +1131,19 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) pm_runtime_get_sync(hdmi->dev); ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate); - if (ret < 0) + if (ret < 0) { + pm_runtime_put(hdmi->dev); goto out; + } hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE; /* Reconfigure the clock */ ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate); - if (ret < 0) + if (ret < 0) { + pm_runtime_put(hdmi->dev); goto out; + } msleep(10); sh_hdmi_configure(hdmi); @@ -1336,6 +1340,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev) ecodec: free_irq(irq, hdmi); ereqirq: + pm_runtime_suspend(&pdev->dev); pm_runtime_disable(&pdev->dev); iounmap(hdmi->base); emap: @@ -1372,6 +1377,7 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev) free_irq(irq, hdmi); /* Wait for already scheduled work */ cancel_delayed_work_sync(&hdmi->edid_work); + pm_runtime_suspend(&pdev->dev); pm_runtime_disable(&pdev->dev); clk_disable(hdmi->hdmi_clk); clk_put(hdmi->hdmi_clk); |