@@ -702,7 +702,8 @@ static int __init omap_dpi_probe(struct platform_device *pdev)
dpi_init_output(pdev);
- dpi_probe_pdata(pdev);
+ if (pdev->dev.platform_data)
+ dpi_probe_pdata(pdev);
return 0;
}
@@ -5573,7 +5573,8 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev)
dsi_init_output(dsidev);
- dsi_probe_pdata(dsidev);
+ if (dsidev->dev.platform_data)
+ dsi_probe_pdata(dsidev);
dsi_runtime_put(dsidev);
@@ -1102,7 +1102,8 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
dss_debugfs_create_file("hdmi", hdmi_dump_regs);
- hdmi_probe_pdata(pdev);
+ if (pdev->dev.platform_data)
+ hdmi_probe_pdata(pdev);
return 0;
@@ -1091,7 +1091,8 @@ static int __init omap_rfbihw_probe(struct platform_device *pdev)
rfbi_init_output(pdev);
- rfbi_probe_pdata(pdev);
+ if (pdev->dev.platform_data)
+ rfbi_probe_pdata(pdev);
return 0;
@@ -361,7 +361,8 @@ static int __init omap_sdi_probe(struct platform_device *pdev)
{
sdi_init_output(pdev);
- sdi_probe_pdata(pdev);
+ if (pdev->dev.platform_data)
+ sdi_probe_pdata(pdev);
return 0;
}
@@ -879,7 +879,8 @@ static int __init omap_venchw_probe(struct platform_device *pdev)
venc_init_output(pdev);
- venc_probe_pdata(pdev);
+ if (pdev->dev.platform_data)
+ venc_probe_pdata(pdev);
return 0;
omapdss output drivers always read the platform data. This crashes when there's no platform data when using DT. Add a check to read the platform data only if it exists. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/video/omap2/dss/dpi.c | 3 ++- drivers/video/omap2/dss/dsi.c | 3 ++- drivers/video/omap2/dss/hdmi.c | 3 ++- drivers/video/omap2/dss/rfbi.c | 3 ++- drivers/video/omap2/dss/sdi.c | 3 ++- drivers/video/omap2/dss/venc.c | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-)