drm/imx: imx-ldb: detach bridge on unbind
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 29 Aug 2016 09:12:30 +0000 (11:12 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 29 Aug 2016 14:30:48 +0000 (16:30 +0200)
Don't leave the bridge attached to a stale driver instance when
unbinding, to allow reattachment on a rebind.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/imx-ldb.c

index 27a471c..3ce391c 100644 (file)
@@ -757,6 +757,8 @@ static void imx_ldb_unbind(struct device *dev, struct device *master,
        for (i = 0; i < 2; i++) {
                struct imx_ldb_channel *channel = &imx_ldb->channel[i];
 
+               if (channel->bridge)
+                       drm_bridge_detach(channel->bridge);
                if (channel->panel)
                        drm_panel_detach(channel->panel);