drm/exynos/hdmi: fix removal order
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 25 Sep 2015 12:48:20 +0000 (14:48 +0200)
committerInki Dae <daeinki@gmail.com>
Mon, 26 Oct 2015 06:09:40 +0000 (15:09 +0900)
DRM device should be destroyed before releasing resources.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_hdmi.c

index 50ced7091c83b0d95d0825d6a125ec375499c8af..725ddb58a624e73e36d03c2f7c9bcfa21a0ed9d8 100644 (file)
@@ -2046,15 +2046,17 @@ static int hdmi_remove(struct platform_device *pdev)
 
        cancel_delayed_work_sync(&hdata->hotplug_work);
 
+       component_del(&pdev->dev, &hdmi_component_ops);
+
+       pm_runtime_disable(&pdev->dev);
+
        if (hdata->res.reg_hdmi_en)
                regulator_disable(hdata->res.reg_hdmi_en);
 
        if (hdata->hdmiphy_port)
                put_device(&hdata->hdmiphy_port->dev);
-       put_device(&hdata->ddc_adpt->dev);
 
-       pm_runtime_disable(&pdev->dev);
-       component_del(&pdev->dev, &hdmi_component_ops);
+       put_device(&hdata->ddc_adpt->dev);
 
        return 0;
 }