From patchwork Tue Sep 14 18:41:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 180152 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 o8EIg174009470 for ; Tue, 14 Sep 2010 18:42:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089Ab0INSmA (ORCPT ); Tue, 14 Sep 2010 14:42:00 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:45711 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774Ab0INSmA (ORCPT ); Tue, 14 Sep 2010 14:42:00 -0400 Received: by pwi3 with SMTP id 3so2552594pwi.19 for ; Tue, 14 Sep 2010 11:41:59 -0700 (PDT) Received: by 10.114.58.19 with SMTP id g19mr462998waa.73.1284489719549; Tue, 14 Sep 2010 11:41:59 -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 33sm783167wad.6.2010.09.14.11.41.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Sep 2010 11:41:58 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: paul@pwsan.com Subject: [PATCH v2 2/2] OMAP: omap_device: make all devices a child of a new parent device Date: Tue, 14 Sep 2010 11:41:54 -0700 Message-Id: <1284489714-14705-2-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.7.2.1 In-Reply-To: <1284489714-14705-1-git-send-email-khilman@deeprootsystems.com> References: <1284489714-14705-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]); Tue, 14 Sep 2010 18:42:01 +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);