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: 966792 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6BNTZAf022522 for ; Mon, 11 Jul 2011 23:29:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758537Ab1GKX3h (ORCPT ); Mon, 11 Jul 2011 19:29:37 -0400 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]:58107 "EHLO na3sys009aog120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758502Ab1GKX3g (ORCPT ); Mon, 11 Jul 2011 19:29:36 -0400 Received: from mail-iw0-f180.google.com ([209.85.214.180]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKThuHX0Aj+wBAmoyqJG7NugNONvIz1js1@postini.com; Mon, 11 Jul 2011 16:29:36 PDT Received: by mail-iw0-f180.google.com with SMTP id 9so7920169iwn.11 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 Cc: linux-arm-kernel@lists.infradead.org, linux-pm@lists.linux-foundation.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> 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.6 (demeter2.kernel.org [140.211.167.43]); Mon, 11 Jul 2011 23:29:38 +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 } };