]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAPDSS: fix dss_get_ctx_loss_count for DT
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 10 Dec 2012 11:52:55 +0000 (13:52 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 17 Jun 2013 11:00:41 +0000 (14:00 +0300)
When using DT, dss device does not have platform data. However,
dss_get_ctx_loss_count() uses dss device's platform data to find the
get_ctx_loss_count function pointer.

To fix this, dss_get_ctx_loss_count() needs to be changed to get the
platform data from the omapdss device, which is a "virtual" device and
always has platform data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dss.c

index 94f66f9f10a3664958623327fb59fe30de101f27..bd01608e67e237cba61b40cd765e695eb6e77b98 100644 (file)
@@ -157,7 +157,8 @@ static void dss_restore_context(void)
 
 int dss_get_ctx_loss_count(void)
 {
-       struct omap_dss_board_info *board_data = dss.pdev->dev.platform_data;
+       struct platform_device *core_pdev = dss_get_core_pdev();
+       struct omap_dss_board_info *board_data = core_pdev->dev.platform_data;
        int cnt;
 
        if (!board_data->get_context_loss_count)