From patchwork Wed Sep 15 23:55:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 184142 X-Patchwork-Delegate: khilman@deeprootsystems.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 o8FNto8I025749 for ; Wed, 15 Sep 2010 23:56:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754938Ab0IOX4L (ORCPT ); Wed, 15 Sep 2010 19:56:11 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:35690 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754472Ab0IOX4K (ORCPT ); Wed, 15 Sep 2010 19:56:10 -0400 Received: by mail-gy0-f174.google.com with SMTP id 8so224515gyd.19 for ; Wed, 15 Sep 2010 16:56:10 -0700 (PDT) Received: by 10.100.105.15 with SMTP id d15mr2635607anc.212.1284594969415; Wed, 15 Sep 2010 16:56:09 -0700 (PDT) Received: from localhost (c-24-18-179-55.hsd1.wa.comcast.net [24.18.179.55]) by mx.google.com with ESMTPS id c7sm3034035ana.38.2010.09.15.16.56.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 16:56:09 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/10] OMAP: omap_device: make all devices a child of a new parent device Date: Wed, 15 Sep 2010 16:55:46 -0700 Message-Id: <1284594946-28963-11-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.7.2.1 In-Reply-To: <1284594946-28963-1-git-send-email-khilman@deeprootsystems.com> References: <1284594946-28963-1-git-send-email-khilman@deeprootsystems.com> 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.3 (demeter1.kernel.org [140.211.167.41]); Wed, 15 Sep 2010 23:56:12 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index bad4c3d..28e2d1a 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h @@ -36,6 +36,8 @@ #include +extern struct device omap_device_parent; + /* omap_device._state values */ #define OMAP_DEVICE_STATE_UNKNOWN 0 #define OMAP_DEVICE_STATE_ENABLED 1 diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 7f05f49..8215b1b 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -465,6 +465,7 @@ int omap_device_register(struct omap_device *od) { pr_debug("omap_device: %s: registering\n", od->pdev.name); + od->pdev.dev.parent = &omap_device_parent; return platform_device_register(&od->pdev); } @@ -737,3 +738,14 @@ int omap_device_enable_clocks(struct omap_device *od) /* XXX pass along return value here? */ return 0; } + +struct device omap_device_parent = { + .init_name = "omap", + .parent = &platform_bus, +}; + +static int __init omap_device_init(void) +{ + return device_register(&omap_device_parent); +} +core_initcall(omap_device_init);