From patchwork Fri Apr 12 09:41:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 16075 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 589B826EB0 for ; Fri, 12 Apr 2013 09:43:07 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 26sf3588046yhr.2 for ; Fri, 12 Apr 2013 02:42:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=hdtg+KU8VX5QbaMaHeCp34V5ipYoBNK5dSAgtrKsTjs=; b=AMev7VanZ4YcRF7RYvpSy+LFzyMmAqDdgeNeTu5r4vUEolxfam+BJcTbLZmecTSSYy aHK0/I9RxfxUQAphNKQ4MY8O0LEfSVhZGdpskR0ZvUVrwLVM/vzP/anD+iBpN3LMMC3i gpX/xcGu6f82c1RLRu2+Mv1Ui7YPTDeSaBSlmMwdF4plf1Q0qn9QZ2tgG71KcV2DhB+F T7LSGJOXcNJ53eqy0udrvakg6dYfyRjzZqRWDkESBheLj6DP4wBlq+Euw7S/SJx2UeNp b/HG7xA/MCqsbNm4/frnlznnXFbhDzJJpphK089YYKJTacgWuBoXZB27zcMf98RZUEid HPZw== X-Received: by 10.224.18.132 with SMTP id w4mr5867629qaa.1.1365759763764; Fri, 12 Apr 2013 02:42:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.86.36 with SMTP id m4ls1298528qez.41.gmail; Fri, 12 Apr 2013 02:42:43 -0700 (PDT) X-Received: by 10.52.100.5 with SMTP id eu5mr6638493vdb.66.1365759763630; Fri, 12 Apr 2013 02:42:43 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id da5si6044289vdc.76.2013.04.12.02.42.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 02:42:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id cz11so2196820veb.24 for ; Fri, 12 Apr 2013 02:42:43 -0700 (PDT) X-Received: by 10.58.181.201 with SMTP id dy9mr7842614vec.34.1365759763123; Fri, 12 Apr 2013 02:42:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp58311veb; Fri, 12 Apr 2013 02:42:42 -0700 (PDT) X-Received: by 10.15.24.71 with SMTP id i47mr15114201eeu.0.1365759761907; Fri, 12 Apr 2013 02:42:41 -0700 (PDT) Received: from eu1sys200aog116.obsmtp.com (eu1sys200aog116.obsmtp.com [207.126.144.141]) by mx.google.com with SMTP id z49si10878508eep.16.2013.04.12.02.42.28 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 02:42:41 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.141 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.141; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob116.postini.com ([207.126.147.11]) with SMTP ID DSNKUWfXA9f5rC4EqaEeIlXGMYddBqrOrxfB@postini.com; Fri, 12 Apr 2013 09:42:41 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 8762A1C6; Fri, 12 Apr 2013 09:41:50 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4CCF948DC; Fri, 12 Apr 2013 09:41:48 +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 A53A524C080; Fri, 12 Apr 2013 11:41:44 +0200 (CEST) Received: from steludxu1397.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Fri, 12 Apr 2013 11:41:49 +0200 From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Cc: , Rickard Andersson , Ulf Hansson , Kevin Hilman , Alan Stern Subject: [PATCH] PM / Runtime: Improve prepare handling at system suspend for genpd Date: Fri, 12 Apr 2013 11:41:44 +0200 Message-ID: <1365759704-23722-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnZiZpGQvoMN1RIc2WfqmuYjMIYxBGXPsUdSOcOa8QZiyJXyu3XxGDNQIi5M2H6JwIGmqkx X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ulf Hansson When genpd prepares for a system suspend it will fetch a runtime reference for the device. When returning it we now use the asyncronous runtime PM API. Thus we don't have to wait for the device to become idle|suspended before we move on and handle the next device in queue. Signed-off-by: Ulf Hansson Cc: Kevin Hilman Cc: Alan Stern --- drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 9a6b05a..e6ec4a7 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev) pm_wakeup_event(dev, 0); if (pm_wakeup_pending()) { - pm_runtime_put_sync(dev); + pm_runtime_put(dev); return -EBUSY; } @@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev) pm_runtime_enable(dev); } - pm_runtime_put_sync(dev); + pm_runtime_put(dev); return ret; }