From f6769968b5569f3d033c67e0bf53e2deec78a45c Mon Sep 17 00:00:00 2001
From: Afzal Mohammed <afzal@ti.com>
Date: Mon, 31 Dec 2012 00:02:32 +0530
Subject: [PATCH 12/51] video: da8xx-fb: invoke platform callback safely

Ensure that platform data is present before checking whether platform
callback is present (the one used to control backlight). So far this
was not an issue as driver was purely non-DT triggered, but now DT
support has been added.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 drivers/video/da8xx-fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c
===================================================================
--- linux-3.12.36-rt50-r4s2.orig/drivers/video/da8xx-fb.c
+++ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c
@@ -1409,7 +1409,7 @@ static int fb_probe(struct platform_devi
        par->dev = &device->dev;
        par->lcdc_clk = tmp_lcdc_clk;
        par->lcdc_clk_rate = clk_get_rate(par->lcdc_clk);
-       if (fb_pdata->panel_power_ctrl) {
+       if (fp_pdata && fb_pdata->panel_power_ctrl) {
                par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
                par->panel_power_ctrl(1);
        }