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: 5549161 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 677C49F2B9 for ; Mon, 29 Dec 2014 10:39:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 635A02011E for ; Mon, 29 Dec 2014 10:39:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9181920117 for ; Mon, 29 Dec 2014 10:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751200AbaL2Kjx (ORCPT ); Mon, 29 Dec 2014 05:39:53 -0500 Received: from mail-la0-f43.google.com ([209.85.215.43]:63996 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbaL2Kjw (ORCPT ); Mon, 29 Dec 2014 05:39:52 -0500 Received: by mail-la0-f43.google.com with SMTP id s18so11067054lam.30 for ; Mon, 29 Dec 2014 02:39:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1fRKgpsKzaB26P5Ok2YOI5FCP/mvilAvzKIUIATbO00=; b=EzgiT+BDZ4A4g6Tnnh0szcFTdk7qSC/15F5oHWhVGmTWaVfZYLf+klN4ylb8jh5op9 umUKakqje5GfEzG6f1ydxSrLeFrgDHfQZG24QA2bIfVSBsxjfoXdnxSP2AABPJzBX9qw nUYuYb50+4ZvJHTVKy2te7oOf13IhHYSnkaAQm2r4/2jHN3aV+h1xl5gTRwLNbZbRToD G1D+7Rsm2EAy0cBrAwCx3SnUv9Aw5HHGU2fzAwkeGUwyyJFHf4fCGawakG7t+6VDxhTq bpFcbetq3WMZYmw3+mvmooYinVnBcb8E3grX6HR3h8RbOVfpekF5lXRfTg/ktEl78BV1 qfnQ== X-Gm-Message-State: ALoCoQnFqiQs+Kpk96Ys6BCGizGw9IC8MU8RYhuvQ2M4LUCd9NaAHlLkS9SRi6s4mMzxukBuAVwh 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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: