From patchwork Fri Sep 28 11:21:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 11840 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 F2DCB23E42 for ; Fri, 28 Sep 2012 11:21:58 +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 8EDFCA1897D for ; Fri, 28 Sep 2012 11:21:58 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so6600557iej.11 for ; Fri, 28 Sep 2012 04:21:58 -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:in-reply-to:references :mime-version:content-type:x-gm-message-state; bh=qGqhWzS2SoKkQpJoVEJ5+29j/rFF7g7H2j1yERG+3nI=; b=LxGkTZMoYcrmnL47g1dsw/Cf2sTPeTrVxAFqbNPtCwq2zGd7zL9d6clT+HdfeK7q3p nxq4i0GOncZq1Ie+re0PeivhKCjlcjnFqKdq4KpXw/a677BTx3qkoLrbSIFg0p06vET+ h9jCeL72aAUEYH9GrqgPb61yAI8T7olpmV4N15ttzoZWpeWSbUYepP6uX1f8Dok4Kbw7 VxfCt9vY+K/KcWgCSdSTqZUSYmZHbIlw1esYfCurPyRNOz9W/t06NStPbzDdaEwza786 EU6RNsVl9nunEjE+w700G4jsk9Ykny0I5INlvLL1cDkIy1lyLpHR2tPKHxirzOZO9wqL 2wpg== Received: by 10.42.84.69 with SMTP id k5mr5369701icl.5.1348831318301; Fri, 28 Sep 2012 04:21:58 -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 ex8csp466174igc; Fri, 28 Sep 2012 04:21:57 -0700 (PDT) Received: by 10.14.221.132 with SMTP id r4mr9437147eep.29.1348831316890; Fri, 28 Sep 2012 04:21:56 -0700 (PDT) Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) by mx.google.com with SMTP id 42si7164107eee.48.2012.09.28.04.21.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 04:21:56 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.147 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.147; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.147 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-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKUGWIS7lLiFd91WeCOlKZi1D98GAs4ana@postini.com; Fri, 28 Sep 2012 11:21:56 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2D92BDE; Fri, 28 Sep 2012 11:21:32 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AE47E2BC3; Fri, 28 Sep 2012 11:21:32 +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 relay1.stm.gmessaging.net (Postfix) with ESMTPS id 2C5AB24C2F8; Fri, 28 Sep 2012 13:21:26 +0200 (CEST) Received: from steludxu1397.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 28 Sep 2012 13:21:31 +0200 From: Ulf Hansson To: Grant Likely , Cc: , Linus Walleij , Vipul Kumar Samar , Viresh Kumar , Russell King , Ulf Hansson Subject: [PATCH 3/3] spi: spi-pl022: Minor simplification for runtime pm Date: Fri, 28 Sep 2012 13:21:06 +0200 Message-ID: <1348831266-16721-4-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1348831266-16721-1-git-send-email-ulf.hansson@stericsson.com> References: <1348831266-16721-1-git-send-email-ulf.hansson@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlPJLJbMSA5JdJOV5EH+pNiaVEvN2U1+ft2XFsQorKWPyPH0n8pL0VK2gWUMQeo1d9aIMGK 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 --- 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 05cfb61e..e51a026 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2248,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: