From patchwork Wed Oct 17 12:27:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12311 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 F257F1D5170 for ; Wed, 17 Oct 2012 12:27:24 +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 A2FE6A183F6 for ; Wed, 17 Oct 2012 12:27:24 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so11246023iej.11 for ; Wed, 17 Oct 2012 05:27:24 -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=RF5qqCEv8xpFNcRHzjv48C/VO4zF9XcQctZeS+EDTiA=; b=OQflV+dr31YWh52EJa0qGKar4yNa+9UZt4+/xru1tdXQg4kQFLMmpIXX/53HEzlvHs UobXFIJlPNf1tAulxhHxbFQFYfA2nPV+VsJU2PhF0caDI9F6t4DAq9pyPYpL50C7bPx4 UefIvZNkX0QKiGAv2UCr7o0ZcMiDywunkTWIK1BUxcSxUKdROCmiSDUDH1LcApIP0DcG bPbamMRcmu5vIuW26IoW6O3Pz+qlu7RQGZftEY1DxZmgc/LHH4RxrlGS8NdIG7EJlubS t5OUoIFdP+BAZYEqMGV7VRLSGTgCI6LkxxPz7zABXSrXx6aSo8UHYQNX1CDCGK87KlTO m+rg== Received: by 10.50.194.169 with SMTP id hx9mr1288319igc.70.1350476844371; Wed, 17 Oct 2012 05:27:24 -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 n20csp886789igt; Wed, 17 Oct 2012 05:27:23 -0700 (PDT) Received: by 10.14.180.68 with SMTP id i44mr26364398eem.20.1350476842605; Wed, 17 Oct 2012 05:27:22 -0700 (PDT) Received: from eu1sys200aog108.obsmtp.com (eu1sys200aog108.obsmtp.com [207.126.144.125]) by mx.google.com with SMTP id v4si16468080eel.44.2012.10.17.05.27.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2012 05:27:22 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.125 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.125; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.125 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-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUH6kIdPnYvg6A0LgXGF1FK1siqSIxmSJ@postini.com; Wed, 17 Oct 2012 12:27:22 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 1CAA548; Wed, 17 Oct 2012 12:26:40 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 53E3E65; Wed, 17 Oct 2012 08:00:35 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 83F9D24C080; Wed, 17 Oct 2012 14:27:04 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 17 Oct 2012 14:27:10 +0200 From: Linus Walleij To: Grant Likely , Mark Brown , Cc: Anmar Oueja , Ulf Hansson , Linus Walleij Subject: [PATCH 2/4] spi: spi-pl022: Minor simplification for runtime pm Date: Wed, 17 Oct 2012 14:27:08 +0200 Message-ID: <1350476828-13091-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: ALoCoQl41IAzQEGQVzjihvR1gdcChWspa6NcYxrHSKZPeF0nvY7bvQVmYaddL7YdUyiu7tOJ0Use From: Ulf Hansson In probe pm_runtime_put_autosuspend has the same effect as doing pm_runtime_put. This due to upper layer in driver core is preventing the device from being runtime suspended by a pm_runtime_get*. 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: