From patchwork Thu Jun 16 04:42:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 884142 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5G4hBDI013083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 16 Jun 2011 04:43:32 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QX4Px-0007Hl-Od; Thu, 16 Jun 2011 04:42:58 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QX4Px-0001K1-9X; Thu, 16 Jun 2011 04:42:57 +0000 Received: from mail-pz0-f49.google.com ([209.85.210.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QX4P8-00016h-V3 for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2011 04:42:08 +0000 Received: by mail-pz0-f49.google.com with SMTP id 28so956444pzk.36 for ; Wed, 15 Jun 2011 21:42:06 -0700 (PDT) Received: by 10.68.12.72 with SMTP id w8mr304199pbb.165.1308199326330; Wed, 15 Jun 2011 21:42:06 -0700 (PDT) Received: from localhost (S01060002b3d79728.cg.shawcable.net [70.72.87.49]) by mx.google.com with ESMTPS id y2sm639282pbi.19.2011.06.15.21.42.05 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Jun 2011 21:42:05 -0700 (PDT) Received: from [127.0.1.1] (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 0FD6D180808; Wed, 15 Jun 2011 22:42:04 -0600 (MDT) Subject: [RFC PATCH 05/11] dt: Add default match table for bus ids To: Nicolas Pitre , Russell King , Arnd Bergmann , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Grant Likely Date: Wed, 15 Jun 2011 22:42:04 -0600 Message-ID: <20110616044200.29371.80953.stgit@ponder> In-Reply-To: <20110616042653.29371.2052.stgit@ponder> References: <20110616042653.29371.2052.stgit@ponder> User-Agent: StGit/0.15 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110616_004207_333774_307D0ACD X-CRM114-Status: GOOD ( 14.74 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.49 listed in list.dnswl.org] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 16 Jun 2011 04:43:32 +0000 (UTC) No need for most platforms to define their own bus table when calling of_platform_populate(). Supply a stock one. Signed-off-by: Grant Likely --- drivers/of/platform.c | 8 ++++++++ include/linux/of_platform.h | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 9b785be..1f4a5d3 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -22,6 +22,14 @@ #include #include +const struct of_device_id of_default_bus_match_table[] = { + { .compatible = "simple-bus", }, +#ifdef CONFIG_ARM_AMBA + { .compatible = "arm,amba-bus", }, +#endif /* CONFIG_ARM_AMBA */ + {} /* Empty terminated list */ +}; + static int of_dev_node_match(struct device *dev, void *data) { return dev->of_node == data; diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 43c723d..8390233 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -40,6 +40,8 @@ struct of_platform_driver #define to_of_platform_driver(drv) \ container_of(drv,struct of_platform_driver, driver) +extern const struct of_device_id of_default_bus_match_table[]; + /* Platform drivers register/unregister */ extern struct platform_device *of_device_alloc(struct device_node *np, const char *bus_id,