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:

committed by
Tomi Valkeinen

parent
73fc0ac4a6
commit
fb5571717c
@@ -55,9 +55,6 @@ static int tpd_connect(struct omap_dss_device *dssdev,
|
||||
return r;
|
||||
}
|
||||
|
||||
dst->src = dssdev;
|
||||
dssdev->dst = dst;
|
||||
|
||||
gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
|
||||
gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1);
|
||||
|
||||
@@ -74,17 +71,9 @@ static void tpd_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;
|
||||
|
||||
gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
|
||||
gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
|
||||
|
||||
dst->src = NULL;
|
||||
dssdev->dst = NULL;
|
||||
|
||||
omapdss_device_disconnect(in, &ddata->dssdev);
|
||||
|
||||
omap_dss_put_device(in);
|
||||
|
Reference in New Issue
Block a user