From patchwork Tue Mar 26 13:33:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2336461 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 344233FD40 for ; Tue, 26 Mar 2013 13:34:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934320Ab3CZNek (ORCPT ); Tue, 26 Mar 2013 09:34:40 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55853 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934238Ab3CZNeh (ORCPT ); Tue, 26 Mar 2013 09:34:37 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2QDYbOh028391; Tue, 26 Mar 2013 08:34:37 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2QDYbPg015392; Tue, 26 Mar 2013 08:34:37 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Tue, 26 Mar 2013 08:34:37 -0500 Received: from deskari.tieu.ti.com (h64-3.vpn.ti.com [172.24.64.3]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2QDYUbu025381; Tue, 26 Mar 2013 08:34:36 -0500 From: Tomi Valkeinen To: , , Archit Taneja CC: Tomi Valkeinen Subject: [PATCH 04/26] OMAPDSS: fix dss_get_ctx_loss_count for DT Date: Tue, 26 Mar 2013 15:33:34 +0200 Message-ID: <1364304836-18134-5-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364304836-18134-1-git-send-email-tomi.valkeinen@ti.com> References: <1364304836-18134-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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, change 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 --- drivers/video/omap2/dss/dss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index fdd32e8..62db201 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -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)