From patchwork Sat Aug 6 00:19:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 1040392 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p760Jhu8010789 for ; Sat, 6 Aug 2011 00:19:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932337Ab1HFATl (ORCPT ); Fri, 5 Aug 2011 20:19:41 -0400 Received: from na3sys009aog119.obsmtp.com ([74.125.149.246]:47644 "EHLO na3sys009aog119.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932306Ab1HFATj (ORCPT ); Fri, 5 Aug 2011 20:19:39 -0400 Received: from mail-yx0-f181.google.com ([209.85.213.181]) (using TLSv1) by na3sys009aob119.postini.com ([74.125.148.12]) with SMTP ID DSNKTjyImgJ7RbYb3J8RdHyzXqRCfcw1MOf0@postini.com; Fri, 05 Aug 2011 17:19:39 PDT Received: by mail-yx0-f181.google.com with SMTP id 13so2316054yxi.12 for ; Fri, 05 Aug 2011 17:19:38 -0700 (PDT) Received: by 10.43.134.10 with SMTP id ia10mr2539118icc.339.1312589978345; Fri, 05 Aug 2011 17:19:38 -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 v16sm2374127ibf.8.2011.08.05.17.19.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Aug 2011 17:19:38 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org, Grant Likely Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/9] OMAP: omap_device: _disable_idle_on_suspend() takes platform_device pointer Date: Fri, 5 Aug 2011 17:19:23 -0700 Message-Id: <1312589965-19416-8-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1312589965-19416-1-git-send-email-khilman@ti.com> References: <1312589965-19416-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 (demeter1.kernel.org [140.211.167.41]); Sat, 06 Aug 2011 00:19:44 +0000 (UTC) Public omap_device functions need to take platform_device pointers, conversion to omap_device pointers is done internal to the omap_device layer. Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/gpio.c | 2 +- arch/arm/mach-omap2/serial.c | 2 +- arch/arm/plat-omap/include/plat/omap_device.h | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 76abdcb..652ccc5 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c @@ -119,7 +119,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) return PTR_ERR(pdev); } - omap_device_disable_idle_on_suspend(od); + omap_device_disable_idle_on_suspend(pdev); gpio_bank_count++; return 0; diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 53b6808..3d1c1d3 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -805,7 +805,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n", name, oh->name); - omap_device_disable_idle_on_suspend(od); + omap_device_disable_idle_on_suspend(pdev); oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); uart->irq = oh->mpu_irqs[0].irq; diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index 750f401..4f98770 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h @@ -116,11 +116,6 @@ int omap_device_enable_hwmods(struct omap_device *od); int omap_device_disable_clocks(struct omap_device *od); int omap_device_enable_clocks(struct omap_device *od); -static inline void omap_device_disable_idle_on_suspend(struct omap_device *od) -{ - od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; -} - /* * Entries should be kept in latency order ascending * @@ -153,4 +148,12 @@ struct omap_device_pm_latency { /* Get omap_device pointer from platform_device pointer */ #define to_omap_device(x) container_of((x), struct omap_device, pdev) +static inline +void omap_device_disable_idle_on_suspend(struct platform_device *pdev) +{ + struct omap_device *od = to_omap_device(pdev); + + od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; +} + #endif