From patchwork Wed Sep 26 15:33:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 11740 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3FF4E24140 for ; Wed, 26 Sep 2012 15:33:30 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id E2A18A18104 for ; Wed, 26 Sep 2012 15:33:29 +0000 (UTC) Received: by ieje10 with SMTP id e10so1681988iej.11 for ; Wed, 26 Sep 2012 08:33:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=QtIX76VoOyYw8siweGHueqNkKbdSi5CUX7rvRZolckI=; b=RwAMD7tDthe95JZwqxuF2h5HT+Kvb0nEgSasmJ6mWIz8KWPkI8rPPiGApL16RZVTdy y4D/vzxNE/n0LhbRw7acrdUiapzy0KiQ1SgJjNuLMkcdiXYIfxlQIEr/M8qY+vzaHC3Q RBM6dQrrrt/rxs00eEtQtAK961CzOsjfl5NcfK25tu3I4p8mwxIiyMQ343pFt1Q5rXN2 SBQYZ08DD/hzwTnELxMEwo9NAm+AeqpV43agptxFFCME5yohNvlM8PFMxLHeye4+j3q4 QIpZcw1GlhPedbz+yC+kfw1ZFO/w/PFaHjJgJZz/sEKQJy113rluOU6jt3mhEdE0xJfF 2jJA== Received: by 10.42.84.69 with SMTP id k5mr745663icl.5.1348673609274; Wed, 26 Sep 2012 08:33:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp362520igc; Wed, 26 Sep 2012 08:33:28 -0700 (PDT) Received: by 10.14.179.136 with SMTP id h8mr2005246eem.6.1348673606935; Wed, 26 Sep 2012 08:33:26 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com [207.126.144.129]) by mx.google.com with SMTP id h45si3100311eem.137.2012.09.26.08.33.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Sep 2012 08:33:26 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) smtp.mail=ulf.hansson@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKUGMgOftQgpjW73ZmZ1AoHYKukhZ5Mfei@postini.com; Wed, 26 Sep 2012 15:33:26 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id ADE3D54; Wed, 26 Sep 2012 15:32:39 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id C048D49; Wed, 26 Sep 2012 11:22:44 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id B84CCA8065; Wed, 26 Sep 2012 17:33:03 +0200 (CEST) Received: from steludxu1397.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 26 Sep 2012 17:33:09 +0200 From: Ulf Hansson To: Grant Likely , Cc: , Linus Walleij , Vipul Kumar Samar , Viresh Kumar , Ulf Hansson Subject: [PATCH] spi/pl022: Simplify use of runtime pm Date: Wed, 26 Sep 2012 17:33:00 +0200 Message-ID: <1348673580-17265-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQn7f7ZHB/Z9wQ+psq0j0AlSUkhXAOb8mCCcWSj/Cv/gLinfgS5KR3fk9A+bmLihHbhM5xoz From: Ulf Hansson Signed-off-by: Ulf Hansson --- drivers/spi/spi-pl022.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index f8568b4..e51a026 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2188,8 +2188,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n", adev->res.start, pl022->virtbase); - pm_runtime_resume(dev); - pl022->clk = clk_get(&adev->dev, NULL); if (IS_ERR(pl022->clk)) { status = PTR_ERR(pl022->clk); @@ -2250,10 +2248,9 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) pm_runtime_set_autosuspend_delay(dev, platform_info->autosuspend_delay); pm_runtime_use_autosuspend(dev); - pm_runtime_put_autosuspend(dev); - } else { - pm_runtime_put(dev); } + pm_runtime_put(dev); + return 0; err_spi_register: @@ -2302,7 +2299,6 @@ pl022_remove(struct amba_device *adev) clk_disable(pl022->clk); clk_unprepare(pl022->clk); clk_put(pl022->clk); - pm_runtime_disable(&adev->dev); iounmap(pl022->virtbase); amba_release_regions(adev); tasklet_disable(&pl022->pump_transfers);