From patchwork Fri Dec 19 09:47:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5518621 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 413F9BEEA8 for ; Fri, 19 Dec 2014 09:47:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B5B620138 for ; Fri, 19 Dec 2014 09:47:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85CC82012B for ; Fri, 19 Dec 2014 09:47:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751979AbaLSJrL (ORCPT ); Fri, 19 Dec 2014 04:47:11 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:38186 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602AbaLSJrI (ORCPT ); Fri, 19 Dec 2014 04:47:08 -0500 Received: by mail-la0-f45.google.com with SMTP id gq15so513564lab.32 for ; Fri, 19 Dec 2014 01:47:07 -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=6jAq3Ny98B0Bbwrh9YRMITwBz+SJYweC9u8Dlyzpry4=; b=ahJSQ1vEUu5rIzTVwEOUNjfG4T6BuDvwJMytFppFGozw6BqtdG2qZnBUOEB6ZhCLkz rItFJbBB1ZqjK6TZqJSDxlnpRN1D6CqCzdJN6G/3j7Fdo8IbIsz5IqIJRQhfSSEH+EeD B1RuWiWiEwCZnLg4zhO8JYFtof2E/PeFlRkGPCh8Ewiy4H2/HPwXxG8ZBObNaTDXoiii eNha977hAavZDUmjO2LppWrWKNGqMGYGsO7p2c4fgZg4I1RHPYUjDcWSUe+prLNKpQ+j rIuwaPHflQlLU0iKHTMTEoVVjE9dLqwVFbedsgFex8MBC0hYKZEfjCQ/b8JQjEBKIGdP R7yg== X-Gm-Message-State: ALoCoQlwKRIFrs16PCCApHKd6R0b7WoNQX2hvi9F69+UcG+r9Z8OFu4NbHLGf46Z2Lm4zKC+KjKd X-Received: by 10.152.30.6 with SMTP id o6mr6988889lah.64.1418982427189; Fri, 19 Dec 2014 01:47:07 -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 ci9sm2564568lad.21.2014.12.19.01.47.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Dec 2014 01:47:06 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Chris Ball Cc: Dong Aisheng , Shawn Guo Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: Fixup runtime PM conditions during ->probe() Date: Fri, 19 Dec 2014 10:47:03 +0100 Message-Id: <1418982423-8069-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 By configure runtime PM prior we enable the use of it, we close the gap for strange and unhandled conditions. Moreover it makes us rely on the driver core, after finalized ->probe(), to request an inactive device to become runtime PM idle/suspended, which earlier potentially could happen already at pm_runtime_set_autosuspend_delay(). Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 043866c..10ef824 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1080,10 +1080,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) goto disable_clk; pm_runtime_set_active(&pdev->dev); - pm_runtime_enable(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, 50); pm_runtime_use_autosuspend(&pdev->dev); pm_suspend_ignore_children(&pdev->dev, 1); + pm_runtime_enable(&pdev->dev); return 0;