summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays/encoder-opa362.c')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-opa362.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index f661ba8f3fa0..3243e5f9bd06 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -31,36 +31,16 @@ struct panel_drv_data {
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
-static int opa362_connect(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst)
+static int opa362_connect(struct omap_dss_device *src,
+ struct omap_dss_device *dst)
{
- struct omap_dss_device *src;
- int r;
-
- src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0);
- if (IS_ERR(src)) {
- dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(src);
- }
-
- r = omapdss_device_connect(dssdev->dss, src, dssdev);
- if (r) {
- omapdss_device_put(src);
- return r;
- }
-
- return 0;
+ return omapdss_device_connect(dst->dss, dst, dst->next);
}
-static void opa362_disconnect(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst)
+static void opa362_disconnect(struct omap_dss_device *src,
+ struct omap_dss_device *dst)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *src = dssdev->src;
-
- omapdss_device_disconnect(src, &ddata->dssdev);
-
- omapdss_device_put(src);
+ omapdss_device_disconnect(dst, dst->next);
}
static int opa362_enable(struct omap_dss_device *dssdev)
@@ -196,7 +176,7 @@ static int __exit opa362_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(dssdev, dssdev->dst);
+ omapdss_device_disconnect(NULL, dssdev);
return 0;
}