2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00

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

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);
}