diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-11-03 20:16:38 -0700 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-12-14 20:01:49 +0100 |
commit | 90a687d61b4812d8fc035a59659dc36359783f60 (patch) | |
tree | d9d29b420aa6d044175336b93c819bf0332c53fd /drivers/video/fbdev/omap2 | |
parent | b7ec002c05d8e01b961bf5d915cf2e42a4cff4dd (diff) | |
download | linux-stable-90a687d61b4812d8fc035a59659dc36359783f60.tar.gz linux-stable-90a687d61b4812d8fc035a59659dc36359783f60.tar.bz2 linux-stable-90a687d61b4812d8fc035a59659dc36359783f60.zip |
fbdev: omapfb: connector-analog-tv: remove support for platform data
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 <dmitry.torokhov@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev/omap2')
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c | 60 |
1 files changed, 8 insertions, 52 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c index a9fd732f8103..0daaf9f89bab 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c @@ -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; @@ -178,53 +177,15 @@ 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; @@ -232,16 +193,11 @@ 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; + 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; |