diff options
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) | |||
1131 | pm_runtime_get_sync(hdmi->dev); | 1131 | pm_runtime_get_sync(hdmi->dev); |
1132 | 1132 | ||
1133 | ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate); | 1133 | ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate); |
1134 | if (ret < 0) | 1134 | if (ret < 0) { |
1135 | pm_runtime_put(hdmi->dev); | ||
1135 | goto out; | 1136 | goto out; |
1137 | } | ||
1136 | 1138 | ||
1137 | hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE; | 1139 | hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE; |
1138 | 1140 | ||
1139 | /* Reconfigure the clock */ | 1141 | /* Reconfigure the clock */ |
1140 | ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate); | 1142 | ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate); |
1141 | if (ret < 0) | 1143 | if (ret < 0) { |
1144 | pm_runtime_put(hdmi->dev); | ||
1142 | goto out; | 1145 | goto out; |
1146 | } | ||
1143 | 1147 | ||
1144 | msleep(10); | 1148 | msleep(10); |
1145 | sh_hdmi_configure(hdmi); | 1149 | sh_hdmi_configure(hdmi); |
@@ -1336,6 +1340,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev) | |||
1336 | ecodec: | 1340 | ecodec: |
1337 | free_irq(irq, hdmi); | 1341 | free_irq(irq, hdmi); |
1338 | ereqirq: | 1342 | ereqirq: |
1343 | pm_runtime_suspend(&pdev->dev); | ||
1339 | pm_runtime_disable(&pdev->dev); | 1344 | pm_runtime_disable(&pdev->dev); |
1340 | iounmap(hdmi->base); | 1345 | iounmap(hdmi->base); |
1341 | emap: | 1346 | emap: |
@@ -1372,6 +1377,7 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev) | |||
1372 | free_irq(irq, hdmi); | 1377 | free_irq(irq, hdmi); |
1373 | /* Wait for already scheduled work */ | 1378 | /* Wait for already scheduled work */ |
1374 | cancel_delayed_work_sync(&hdmi->edid_work); | 1379 | cancel_delayed_work_sync(&hdmi->edid_work); |
1380 | pm_runtime_suspend(&pdev->dev); | ||
1375 | pm_runtime_disable(&pdev->dev); | 1381 | pm_runtime_disable(&pdev->dev); |
1376 | clk_disable(hdmi->hdmi_clk); | 1382 | clk_disable(hdmi->hdmi_clk); |
1377 | clk_put(hdmi->hdmi_clk); | 1383 | clk_put(hdmi->hdmi_clk); |