Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2445c4a4 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Inki Dae
Browse files

drm/exynos/hdmi: fix removal order



DRM device should be destroyed before releasing resources.

Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 1993c339
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -2046,15 +2046,17 @@ static int hdmi_remove(struct platform_device *pdev)


	cancel_delayed_work_sync(&hdata->hotplug_work);
	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)
	if (hdata->res.reg_hdmi_en)
		regulator_disable(hdata->res.reg_hdmi_en);
		regulator_disable(hdata->res.reg_hdmi_en);


	if (hdata->hdmiphy_port)
	if (hdata->hdmiphy_port)
		put_device(&hdata->hdmiphy_port->dev);
		put_device(&hdata->hdmiphy_port->dev);
	put_device(&hdata->ddc_adpt->dev);


	pm_runtime_disable(&pdev->dev);
	put_device(&hdata->ddc_adpt->dev);
	component_del(&pdev->dev, &hdmi_component_ops);


	return 0;
	return 0;
}
}