drm/bridge: analogix_dp: Fix connector and encoder cleanup

Since we are initing connector in the core driver and encoder in the
plat driver, let's clean them up in the right places.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-3-thierry.escande@collabora.com
This commit is contained in:
Jeffy Chen
2018-01-10 17:23:42 +01:00
committed by Heiko Stuebner
부모 6b2d8fd98d
커밋 7fe201cd55
3개의 변경된 파일10개의 추가작업 그리고 11개의 파일을 삭제

파일 보기

@@ -185,8 +185,10 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
dp->plat_data.encoder = encoder;
dp->adp = analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
if (IS_ERR(dp->adp))
if (IS_ERR(dp->adp)) {
dp->encoder.funcs->destroy(&dp->encoder);
return PTR_ERR(dp->adp);
}
return 0;
}
@@ -196,7 +198,8 @@ static void exynos_dp_unbind(struct device *dev, struct device *master,
{
struct exynos_dp_device *dp = dev_get_drvdata(dev);
return analogix_dp_unbind(dp->adp);
analogix_dp_unbind(dp->adp);
dp->encoder.funcs->destroy(&dp->encoder);
}
static const struct component_ops exynos_dp_ops = {