From patchwork Tue Jun 21 18:44:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 902752 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 p5LIjYbU018372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2011 18:46:01 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ5wv-0006IK-E7; Tue, 21 Jun 2011 18:45:21 +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 1QZ5wv-0001x7-2K; Tue, 21 Jun 2011 18:45:21 +0000 Received: from mail-pv0-f177.google.com ([74.125.83.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ5wX-0001sn-Bs for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 18:44:58 +0000 Received: by pvh11 with SMTP id 11so36977pvh.36 for ; Tue, 21 Jun 2011 11:44:55 -0700 (PDT) Received: by 10.68.68.242 with SMTP id z18mr1592335pbt.455.1308681895493; Tue, 21 Jun 2011 11:44:55 -0700 (PDT) Received: from localhost (S01060002b3d79728.cg.shawcable.net [70.72.87.49]) by mx.google.com with ESMTPS id d1sm2213345pbj.8.2011.06.21.11.44.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 11:44:54 -0700 (PDT) Received: from [127.0.1.1] (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 29FF318039E; Tue, 21 Jun 2011 12:44:53 -0600 (MDT) Subject: [PATCH 1/5] dt: Add default match table for bus ids To: Nicolas Pitre , devicetree-discuss@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Grant Likely Date: Tue, 21 Jun 2011 12:44:53 -0600 Message-ID: <20110621184453.18176.95533.stgit@ponder> In-Reply-To: <20110621181127.18176.1384.stgit@ponder> References: <20110621181127.18176.1384.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-20110621_144457_612966_A9267FA3 X-CRM114-Status: GOOD ( 14.89 ) 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 [74.125.83.177 listed in list.dnswl.org] Cc: Benjamin Herrenschmidt , Russell King , Arnd Bergmann 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]); Tue, 21 Jun 2011 18:46:01 +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 63d3cb7..bb483ef 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 fb51ae3..8f023f8 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,