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: 1040552 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 p760Lf5a011116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 6 Aug 2011 00:22:02 GMT Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QpUdn-0001sR-UU; Sat, 06 Aug 2011 00:21:24 +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 1QpUdl-0005BQ-Ut; Sat, 06 Aug 2011 00:21:21 +0000 Received: from na3sys009aog125.obsmtp.com ([74.125.149.153]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QpUc9-0004is-80 for linux-arm-kernel@lists.infradead.org; Sat, 06 Aug 2011 00:19:42 +0000 Received: from mail-yx0-f181.google.com ([209.85.213.181]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKTjyImgJ7RbYb3J8RdHyzXqRCfcw1MOf0@postini.com; Fri, 05 Aug 2011 17:19:41 PDT Received: by yxi13 with SMTP id 13so2742342yxi.40 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 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> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110805_201941_659676_F926CB51 X-CRM114-Status: GOOD ( 13.12 ) 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-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]); Sat, 06 Aug 2011 00:22:02 +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