From patchwork Thu May 12 11:56:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 779732 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4CBpuww017999 for ; Thu, 12 May 2011 11:52:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756038Ab1ELLwF (ORCPT ); Thu, 12 May 2011 07:52:05 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:35132 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756027Ab1ELLwE (ORCPT ); Thu, 12 May 2011 07:52:04 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4CBq4wO019039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 12 May 2011 06:52:04 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id p4CBq38P009259 for ; Thu, 12 May 2011 06:52:03 -0500 (CDT) Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4CBq2hE010557; Thu, 12 May 2011 06:52:02 -0500 (CDT) Received: from dlelxv24.itg.ti.com (172.17.1.199) by dlee74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 8.3.106.1; Thu, 12 May 2011 06:52:02 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4CBq2wT001727; Thu, 12 May 2011 06:52:02 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.144]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p4CBq0f21938; Thu, 12 May 2011 06:52:00 -0500 (CDT) From: Archit Taneja To: CC: , Archit Taneja Subject: [PATCH v2 4/7] OMAP: DSS2: DSI: Use platform_device pointer to get dsi data Date: Thu, 12 May 2011 17:26:27 +0530 Message-ID: <1305201390-9724-5-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305201390-9724-1-git-send-email-archit@ti.com> References: <1305201390-9724-1-git-send-email-archit@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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 12 May 2011 11:52:07 +0000 (UTC) The dsi related data structure currently creates one global instance of itself which is accessed by dsi functions. Remove this global structure instance and declare the struct as dsi_data. Modify dsi_init() to allocate a "dsi_data" structure for each platform device instance. Link this data with the device's platform_device pointer. Create the function dsi_get_dsidrv_data() which takes the pdev and return a pointer to the device's dsi_data. Make dsi_get_dsidev_id() return only 0 for now, this will be removed once the name of the DSI platform device is changed to the device instance form, like "omapdss_dsi.0" and "omapdss_dsi.1" etc. Signed-off-by: Archit Taneja --- drivers/video/omap2/dss/dsi.c | 672 +++++++++++++++++++++++++---------------- 1 files changed, 409 insertions(+), 263 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 8d03eb6..61ee3db 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -34,6 +34,7 @@ #include #include #include +#include #include