From patchwork Wed Oct 17 17:30:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12326 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 4A9A823F62 for ; Wed, 17 Oct 2012 17:30:26 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id E528CA18794 for ; Wed, 17 Oct 2012 17:30:25 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so5474669iag.11 for ; Wed, 17 Oct 2012 10:30:25 -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=WBS5BzjQxGVe4XRGbbFg+R97Es76sdmMsoXN4Lf6p0s=; b=RKjMWYuC3ly4CXb1916rDUCwFO1clvMBsAMwlHt+HD3PD+qkXQcfRoq+rJJBoLMCbW lp1NLgWhEfKQwgy25hz+zUdd6KLyXhZL+/+4A5vujGy9dIaep36ElmrxKOfHYNfKu6Ce y8v32N8545+cD6q9sVXGxTwuaMBDfUtiGj4tTJVlVxIICRp4GtC9R3Qc6pV+hH/8xA6u WD5M7XL0/0svRWcj/GSz343ZGLaiiPA+2Wqxy7Mo73TYF25AWX1yFYeYx3FJOtlY8+dm xe8I4L2MF912OUBhIPUo1I1h0lrT70ieEcNjyccX6jUq27rDOBqyxmdj/N/nVwpUsITr J7aQ== Received: by 10.50.194.169 with SMTP id hx9mr2281232igc.70.1350495025328; Wed, 17 Oct 2012 10:30:25 -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.67.148 with SMTP id n20csp931810igt; Wed, 17 Oct 2012 10:30:24 -0700 (PDT) Received: by 10.14.0.198 with SMTP id 46mr28303343eeb.21.1350495023963; Wed, 17 Oct 2012 10:30:23 -0700 (PDT) Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com [207.126.144.123]) by mx.google.com with SMTP id a8si17262481eep.53.2012.10.17.10.30.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2012 10:30:23 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.123; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKUH7rIsQAjpD+f/hW/xWZER7BBhXoY0BF@postini.com; Wed, 17 Oct 2012 17:30:23 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 697CCA1; Wed, 17 Oct 2012 17:21:53 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0E5AED93; Wed, 17 Oct 2012 17:30:07 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 2EF2624C2E6; Wed, 17 Oct 2012 19:29:57 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 17 Oct 2012 19:30:05 +0200 From: Linus Walleij To: Grant Likely , Mark Brown , Cc: Anmar Oueja , Ulf Hansson , Linus Walleij Subject: [PATCH 2/4 v2] spi: spi-pl022: Minor simplification for runtime pm Date: Wed, 17 Oct 2012 19:30:01 +0200 Message-ID: <1350495001-16541-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnzUgYZVD8Uq61EJAv2bw1lRgf6ZpOwJnP8Fgg0P4vADoIFSEnrtSOgKUXR1Djb5UBR8oSg From: Ulf Hansson In probe pm_runtime_put_autosuspend has the same effect as doing pm_runtime_put. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij --- drivers/spi/spi-pl022.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index a1db91a..51b7a95 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2246,10 +2246,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: