drm/imx: parallel-display: detach bridge or panel on unbind

Don't leave any bridge or panel attached to a stale driver instance
when unbinding, to allow reattachment on a rebind.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Philipp Zabel 2016-08-29 11:13:27 +02:00
parent 60203c90bf
commit c15d493cb6
1 changed files with 5 additions and 0 deletions

View File

@ -293,6 +293,11 @@ static void imx_pd_unbind(struct device *dev, struct device *master,
{
struct imx_parallel_display *imxpd = dev_get_drvdata(dev);
if (imxpd->bridge)
drm_bridge_detach(imxpd->bridge);
if (imxpd->panel)
drm_panel_detach(imxpd->panel);
kfree(imxpd->edid);
}