drm/omap: connector-analog-tv: remove non-DT support
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 12 May 2017 09:36:48 +0000 (12:36 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Jun 2017 07:57:15 +0000 (10:57 +0300)
Non-DT booting is no longer supported, so remove legacy code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c

index aaa8a58390f1f689e8920cf11052a67ac929b22a..f25ad9fbc4b0e873d780870122b1b03e601bb743 100644 (file)
@@ -14,8 +14,6 @@
 #include <linux/platform_device.h>
 #include <linux/of.h>
 
-#include <video/omap-panel-data.h>
-
 #include "../dss/omapdss.h"
 
 struct panel_drv_data {
@@ -25,8 +23,6 @@ struct panel_drv_data {
        struct device *dev;
 
        struct videomode vm;
-
-       bool invert_polarity;
 };
 
 static const struct videomode tvc_pal_vm = {
@@ -95,13 +91,6 @@ static int tvc_enable(struct omap_dss_device *dssdev)
 
        in->ops.atv->set_timings(in, &ddata->vm);
 
-       if (!ddata->dev->of_node) {
-               in->ops.atv->set_type(in, OMAP_DSS_VENC_TYPE_COMPOSITE);
-
-               in->ops.atv->invert_vid_out_polarity(in,
-                       ddata->invert_polarity);
-       }
-
        r = in->ops.atv->enable(in);
        if (r)
                return r;
@@ -188,30 +177,6 @@ static struct omap_dss_driver tvc_driver = {
        .set_wss                = tvc_set_wss,
 };
 
-static int tvc_probe_pdata(struct platform_device *pdev)
-{
-       struct panel_drv_data *ddata = platform_get_drvdata(pdev);
-       struct connector_atv_platform_data *pdata;
-       struct omap_dss_device *in, *dssdev;
-
-       pdata = dev_get_platdata(&pdev->dev);
-
-       in = omap_dss_find_output(pdata->source);
-       if (in == NULL) {
-               dev_err(&pdev->dev, "Failed to find video source\n");
-               return -EPROBE_DEFER;
-       }
-
-       ddata->in = in;
-
-       ddata->invert_polarity = pdata->invert_polarity;
-
-       dssdev = &ddata->dssdev;
-       dssdev->name = pdata->name;
-
-       return 0;
-}
-
 static int tvc_probe_of(struct platform_device *pdev)
 {
        struct panel_drv_data *ddata = platform_get_drvdata(pdev);
@@ -242,17 +207,9 @@ static int tvc_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, ddata);
        ddata->dev = &pdev->dev;
 
-       if (dev_get_platdata(&pdev->dev)) {
-               r = tvc_probe_pdata(pdev);
-               if (r)
-                       return r;
-       } else if (pdev->dev.of_node) {
-               r = tvc_probe_of(pdev);
-               if (r)
-                       return r;
-       } else {
-               return -ENODEV;
-       }
+       r = tvc_probe_of(pdev);
+       if (r)
+               return r;
 
        ddata->vm = tvc_pal_vm;