From patchwork Mon Dec 29 10:39:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 42637 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8ACA1246A4 for ; Mon, 29 Dec 2014 10:39:54 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id hs14sf7934952lab.5 for ; Mon, 29 Dec 2014 02:39:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=1fRKgpsKzaB26P5Ok2YOI5FCP/mvilAvzKIUIATbO00=; b=g7XRb8vqpuhLZ8LXKdc+UcOvYIuz29uomljXuICFR0rkzdJtSfweXDK8geRfE/YqFf gkNOEqU9qcEhDZZkQdEdxCUFeJO66eY0j/Z+844kUh4O8H1kY96WVZWd0+zX35FaSRZ6 cb1EtYFWHxhE1v9d8HemHlO42mQf3OMH1osla+D0B2sLHS4glq49hKlWqVd5d4MwDJG+ VJeTjHMlLzGtcX9eldXfmCz8AWnZDWyX5mtcyb+l97kCPu3ipgVVTIULJI5fxHP8S/sK KCJm8GbO0Y9Q5TV6h4FycQ6Yrb5lpGZvvi7NxY+btRvybgvg9mxkPN0FsvhhSxrtapG6 m6cg== X-Gm-Message-State: ALoCoQmLb+fA7BHDgU+H2cfBThmYraQ5OBa3hNeuwiZ8+gsPIXNAwTILWrH3AO/NEqjG8Ckem/2+ X-Received: by 10.180.19.42 with SMTP id b10mr5815610wie.0.1419849593314; Mon, 29 Dec 2014 02:39:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.202 with SMTP id m10ls1018646lah.76.gmail; Mon, 29 Dec 2014 02:39:53 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr56183754lbc.91.1419849593155; Mon, 29 Dec 2014 02:39:53 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id al1si38978110lbc.23.2014.12.29.02.39.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Dec 2014 02:39:52 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id z11so2897306lbi.34 for ; Mon, 29 Dec 2014 02:39:52 -0800 (PST) X-Received: by 10.112.170.36 with SMTP id aj4mr55387330lbc.3.1419849592780; Mon, 29 Dec 2014 02:39:52 -0800 (PST) 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.112.142.69 with SMTP id ru5csp2741130lbb; Mon, 29 Dec 2014 02:39:52 -0800 (PST) X-Received: by 10.152.23.38 with SMTP id j6mr55867243laf.81.1419849592365; Mon, 29 Dec 2014 02:39:52 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id xz9si11955474lbb.82.2014.12.29.02.39.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Dec 2014 02:39:51 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ms9so10915540lab.24 for ; Mon, 29 Dec 2014 02:39:51 -0800 (PST) X-Received: by 10.152.25.194 with SMTP id e2mr55825182lag.22.1419849591533; Mon, 29 Dec 2014 02:39:51 -0800 (PST) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id aq4sm2308083lbc.46.2014.12.29.02.39.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Dec 2014 02:39:50 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Chris Ball Cc: Russell King Subject: [PATCH V3] mmc: mmci: Do pm_runtime_put() after the host has been added Date: Mon, 29 Dec 2014 11:39:44 +0100 Message-Id: <1419849584-3277-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) 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: , Previously the pm_runtime_put() caused the device to be runtime PM suspended, but then immediately being resumed when we add the host. Prevent this unnecessary runtime PM suspend/resume cycle during ->probe() by moving the call to pm_runtime_put() after mmc_add_host(). Signed-off-by: Ulf Hansson --- Changes in v3: Change to pm_runtime_put(). Update commit message/header accordingly. Changes in v2: Move pm_runtime_put_noidle() after mmc_add_host(). --- drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 8232e9a..88aefa6 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1739,10 +1739,10 @@ static int mmci_probe(struct amba_device *dev, pm_runtime_set_autosuspend_delay(&dev->dev, 50); pm_runtime_use_autosuspend(&dev->dev); - pm_runtime_put(&dev->dev); mmc_add_host(mmc); + pm_runtime_put(&dev->dev); return 0; clk_disable: