From patchwork Tue Aug 9 14:10:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjugk manjugk X-Patchwork-Id: 1049642 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p79Dsbfc012099 for ; Tue, 9 Aug 2011 13:54:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751582Ab1HINyg (ORCPT ); Tue, 9 Aug 2011 09:54:36 -0400 Received: from [117.192.76.145] ([117.192.76.145]:49903 "EHLO manju-desktop" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751565Ab1HINyg (ORCPT ); Tue, 9 Aug 2011 09:54:36 -0400 To: devicetree-discuss@lists.ozlabs.org Date: Tue, 09 Aug 2011 19:10:28 +0500 Subject: [RFC/PATCH 10/14] dt: Add pd_size to AUXDATA structure Envelope-To: devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca References: <1312897232-4792-1-git-send-email-manjugk@ti.com> CC: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca Message-ID: <1312897232-4792-11-git-send-email-manjugk@ti.com> From: "G, Manjunath Kondaiah" Received: from manju-desktop (Citadel from userid 1000) by manju-desktop; Tue, 09 Aug 2011 19:10:36 +0500 X-Mailer: git-send-email 1.7.4.1 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 (demeter2.kernel.org [140.211.167.43]); Tue, 09 Aug 2011 13:54:37 +0000 (UTC) Add pd_size in the AUXDATA structure so that device drivers which require platform_data size can pass along with AUXDATA. Signed-off-by: G, Manjunath Kondaiah --- drivers/of/platform.c | 2 ++ include/linux/of_platform.h | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index ebbbf42..4b27286 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -565,6 +565,7 @@ static int of_platform_bus_create(struct device_node *bus, struct platform_device *dev; const char *bus_id = NULL; void *platform_data = NULL; + int pd_size; int id = -1; int rc = 0; @@ -588,6 +589,7 @@ static int of_platform_bus_create(struct device_node *bus, bus_id = auxdata->name; id = auxdata->id; platform_data = auxdata->platform_data; + pd_size = auxdata->pd_size; } if (of_device_is_compatible(bus, "arm,primecell")) { diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 252246c..a3be980 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -47,6 +47,7 @@ struct of_dev_auxdata { char *name; int id; void *platform_data; + int pd_size; }; /* Macro to simplify populating a lookup table */ @@ -58,6 +59,10 @@ struct of_dev_auxdata { { .compatible = _compat, .phys_addr = _phys, .name = _name, \ .id = _id, .platform_data = _pdata } +#define OF_DEV_AUXDATA_ID_PDSIZE(_compat,_phys,_name,_id,_pdata,_pd_size) \ + { .compatible = _compat, .phys_addr = _phys, .name = _name, \ + .id = _id, .platform_data = _pdata, .pd_size = _pd_size } + /** * of_platform_driver - Legacy of-aware driver for platform devices. *