drm/omap: dss: Move src and dst check and set to connection handlers

The encoders duplicate the same omap_dss_device src and dst fields set
and checks in their connect and disconnect handlers. Move the code to
the connect and disconnect wrappers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Laurent Pinchart
2018-02-28 17:30:30 +02:00
committed by Tomi Valkeinen
parent 73fc0ac4a6
commit fb5571717c
12 changed files with 25 additions and 74 deletions

View File

@@ -51,9 +51,6 @@ static int opa362_connect(struct omap_dss_device *dssdev,
return r;
}
dst->src = dssdev;
dssdev->dst = dst;
ddata->in = in;
return 0;
}
@@ -64,13 +61,6 @@ static void opa362_disconnect(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
WARN_ON(dst != dssdev->dst);
if (dst != dssdev->dst)
return;
dst->src = NULL;
dssdev->dst = NULL;
omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);