Skip to content

Commit

Permalink
fbdev: omapfb: connector-analog-tv: remove support for platform data
Browse files Browse the repository at this point in the history
There are no users of connector_atv_platform_data in the mainline
kernel so support for it can be removed from the panel driver.

Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
  • Loading branch information
dtor authored and hdeller committed Dec 14, 2022
1 parent b7ec002 commit 90a687d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 86 deletions.
60 changes: 8 additions & 52 deletions drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/of.h>

#include <video/omapfb_dss.h>
#include <video/omap-panel-data.h>

struct panel_drv_data {
struct omap_dss_device dssdev;
Expand Down Expand Up @@ -178,70 +177,27 @@ 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);
struct device_node *node = pdev->dev.of_node;
struct omap_dss_device *in;

in = omapdss_of_find_source_for_first_ep(node);
if (IS_ERR(in)) {
dev_err(&pdev->dev, "failed to find video source\n");
return PTR_ERR(in);
}

ddata->in = in;

return 0;
}

static int tvc_probe(struct platform_device *pdev)
{
struct panel_drv_data *ddata;
struct omap_dss_device *dssdev;
int r;

if (!pdev->dev.of_node)
return -ENODEV;

ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
if (!ddata)
return -ENOMEM;

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;
ddata->in = omapdss_of_find_source_for_first_ep(pdev->dev.of_node);
r = PTR_ERR_OR_ZERO(ddata->in);
if (r) {
dev_err(&pdev->dev, "failed to find video source\n");
return r;
}

ddata->timings = tvc_pal_timings;
Expand Down
34 changes: 0 additions & 34 deletions include/video/omap-panel-data.h

This file was deleted.

0 comments on commit 90a687d

Please sign in to comment.