drm/omap: dss: Move debug message and checks to connection handlers
The connectors, encoders and display duplicate the same debug messages and connection checks in their omap_dss_device connect and disconnect handlers. Move the code to the connect and disconnect wrappers. To simplify the code the connect function returns -EBUSY unconditionally if the device is already connected. This doesn't cause any change in practice: the connect handler of displays is never called on a connected device as it is only invoked during omapdrm initialization. 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

orang tua
ec727e3f61
melakukan
1f507968c3
@@ -118,9 +118,6 @@ static int nec_8048_connect(struct omap_dss_device *dssdev)
|
||||
struct omap_dss_device *in;
|
||||
int r;
|
||||
|
||||
if (omapdss_device_is_connected(dssdev))
|
||||
return 0;
|
||||
|
||||
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
|
||||
if (IS_ERR(in)) {
|
||||
dev_err(dssdev->dev, "failed to find video source\n");
|
||||
@@ -142,9 +139,6 @@ static void nec_8048_disconnect(struct omap_dss_device *dssdev)
|
||||
struct panel_drv_data *ddata = to_panel_data(dssdev);
|
||||
struct omap_dss_device *in = ddata->in;
|
||||
|
||||
if (!omapdss_device_is_connected(dssdev))
|
||||
return;
|
||||
|
||||
omapdss_device_disconnect(in, dssdev);
|
||||
|
||||
omap_dss_put_device(in);
|
||||
|
Reference in New Issue
Block a user