From patchwork Mon Jul 11 23:29:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 966832 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6BNUKdI030525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Jul 2011 23:30:42 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QgPvM-0004tQ-Ir; Mon, 11 Jul 2011 23:30:00 +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 1QgPvK-0005rN-FO; Mon, 11 Jul 2011 23:29:58 +0000 Received: from na3sys009aog125.obsmtp.com ([74.125.149.153]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QgPv0-0005nO-5h for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2011 23:29:39 +0000 Received: from mail-iy0-f182.google.com ([209.85.210.182]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKThuHX0Aj+wBAmoyqJG7NugNONvIz1js1@postini.com; Mon, 11 Jul 2011 16:29:38 PDT Received: by mail-iy0-f182.google.com with SMTP id 11so5131550iyb.41 for ; Mon, 11 Jul 2011 16:29:35 -0700 (PDT) Received: by 10.231.49.131 with SMTP id v3mr4871807ibf.112.1310426975672; Mon, 11 Jul 2011 16:29:35 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id x11sm1687698ibd.41.2011.07.11.16.29.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 16:29:34 -0700 (PDT) From: Kevin Hilman To: "Rafael J. Wysocki" , Paul Walmsley , linux-omap@vger.kernel.org Subject: [PATCH 1/4] OMAP: PM: omap_device: conditionally use PM domain runtime helpers Date: Mon, 11 Jul 2011 16:29:26 -0700 Message-Id: <1310426969-30306-2-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1310426969-30306-1-git-send-email-khilman@ti.com> References: <1310426969-30306-1-git-send-email-khilman@ti.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110711_192938_422520_0998771D X-CRM114-Status: GOOD ( 11.76 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.153 listed in list.dnswl.org] Cc: linux-pm@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.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: , MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Mon, 11 Jul 2011 23:30:42 +0000 (UTC) Only build and use the runtime PM helper functions only when runtime PM is actually enabled. Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/omap_device.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index d21579b..f7d2ff7 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -537,6 +537,7 @@ int omap_early_device_register(struct omap_device *od) return 0; } +#ifdef CONFIG_PM_RUNTIME static int _od_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -563,12 +564,12 @@ static int _od_runtime_resume(struct device *dev) return pm_generic_runtime_resume(dev); } +#endif static struct dev_pm_domain omap_device_pm_domain = { .ops = { - .runtime_suspend = _od_runtime_suspend, - .runtime_idle = _od_runtime_idle, - .runtime_resume = _od_runtime_resume, + SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, + _od_runtime_idle) USE_PLATFORM_PM_SLEEP_OPS } };