From patchwork Thu Oct 4 08:04:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 11976 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 714292415A for ; Thu, 4 Oct 2012 08:06:06 +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 2ED6CA18A54 for ; Thu, 4 Oct 2012 08:06:06 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so386146iej.11 for ; Thu, 04 Oct 2012 01:06:05 -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=F9e4VnZKiXuJU8C99V/5blMYSPzfpVwoIcbC8ExtcyU=; b=iK9sjp4MQgvh2Z2SGAV3tSdZ9tn1thEa1AB8u/qW8aymcYOp6284ZLbZy1LLSv1DHz TP3+JhYzrrmcKiJoBECq98PQCHXtXD1AfQatgvIIeXA1mflYOgJgrpCPDyFI9sdhRetW yVLqfna5zNPYYAjFyTsHnKA7MO1+KDwSFDJHxhnfGe20b5/x32OIF+8mWdeXY1AcH3zj iyQ2iKNUQHHMUtTOC3loV/r98HxLlnLvjIMLwq83fDwemsWOdowbwVGr6lx2eCiliU3U cpr7LiNg04S0w7+MEnDX3AdFltXRVMK5vujmWEJc11p29O1dc9o9OzPNfvSg3cdf2NKa PLAg== Received: by 10.42.110.130 with SMTP id q2mr3567821icp.53.1349337965603; Thu, 04 Oct 2012 01:06:05 -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 ex8csp54104igc; Thu, 4 Oct 2012 01:06:04 -0700 (PDT) Received: by 10.14.0.198 with SMTP id 46mr6187966eeb.30.1349337963351; Thu, 04 Oct 2012 01:06:03 -0700 (PDT) Received: from eu1sys200aog106.obsmtp.com (eu1sys200aog106.obsmtp.com [207.126.144.121]) by mx.google.com with SMTP id h44si886058eeo.121.2012.10.04.01.05.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Oct 2012 01:06:03 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.121 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.121; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.121 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 eu1sys200aob106.postini.com ([207.126.147.11]) with SMTP ID DSNKUG1DXtWjzUFLOjmfpv1dzMcgtrStPojU@postini.com; Thu, 04 Oct 2012 08:06:03 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 E2C0C41; Thu, 4 Oct 2012 08:04:22 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id B251270; Thu, 4 Oct 2012 03:48:30 +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 05041A8065; Thu, 4 Oct 2012 10:04:50 +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; Thu, 4 Oct 2012 10:04:53 +0200 From: Ulf Hansson To: Mark Brown , Grant Likely , Cc: , Linus Walleij , Vipul Kumar Samar , Viresh Kumar , Russell King , Ulf Hansson Subject: [PATCH V2 3/3] spi: spi-pl022: Minor simplification for runtime pm Date: Thu, 4 Oct 2012 10:04:41 +0200 Message-ID: <1349337881-15917-4-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349337881-15917-1-git-send-email-ulf.hansson@stericsson.com> References: <1349337881-15917-1-git-send-email-ulf.hansson@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlUrG/VTRQvLtTSbwy8QYLjWXuFczcSYU7m1BaRIpW23l4Li5HJyquLp4WGwY4g3PhIPdwT 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 Reviewed-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: