Message ID | 1413208930-26019-9-git-send-email-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDF57NG2XIHRBC5X56QQKGQEQUSFWBY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D5DCE2039B for <linaro@patches.linaro.org>; Mon, 13 Oct 2014 14:02:52 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id m15sf4168086wgh.7 for <linaro@patches.linaro.org>; Mon, 13 Oct 2014 07:02:52 -0700 (PDT) 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:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=smff/u15brtOK2tNGbN18XvxLrjQXNAVKhEBM1siEq4=; b=UIC8hKF6HfCXLeriP5sDnQkTg9qs3aTBxcNME6KZAaQRd6G7H8Pk/W6Xk5trfx0C9S I09RSaUgS/O1zNrzWWT0ei7+uuhs/K6JAsqiuGH6xl4ImxtJCt38SQ9UHdIwX/91pXXc U7eG9wa7pL0Ya40JbuId/eH3b5sJOlSC+Vy84rMwTlsL9TFeDrP6wFIoTy83bghITnYK VljpkoSOPQLvWe4YMuTqqQN8Igh/OBn84oGQWKm+GRajKcGDy1/jM0dom1ursnfSNHtb ayXzCuX+Elt4k2uiE/87R0aJRLRwgGum/yAbcg1WPmAX6531pFTL9B050d6xE4tgfgPm zG1Q== X-Gm-Message-State: ALoCoQnrY3UO2/DVms7sxRuGN9vEVRXUhd/vazAXFGS5bFk4ej44GDZun+FkySgeAYtAOSQnmVnE X-Received: by 10.112.74.80 with SMTP id r16mr8987lbv.21.1413208971978; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls470067lam.11.gmail; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) X-Received: by 10.112.161.135 with SMTP id xs7mr24133848lbb.13.1413208971809; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx.google.com with ESMTPS id kr10si22356785lac.72.2014.10.13.07.02.51 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 07:02:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so6563418lbg.18 for <patchwork-forward@linaro.org>; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) X-Received: by 10.152.22.42 with SMTP id a10mr24446754laf.56.1413208971717; Mon, 13 Oct 2014 07:02:51 -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.112.84.229 with SMTP id c5csp220173lbz; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) X-Received: by 10.194.184.111 with SMTP id et15mr21712262wjc.14.1413208967483; Mon, 13 Oct 2014 07:02:47 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id g2si17858219wjb.15.2014.10.13.07.02.47 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 07:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 74.125.82.48 as permitted sender) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id k14so8663741wgh.31 for <patches@linaro.org>; Mon, 13 Oct 2014 07:02:47 -0700 (PDT) X-Received: by 10.180.8.165 with SMTP id s5mr1106167wia.4.1413208967206; Mon, 13 Oct 2014 07:02:47 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id fq1sm1533474wib.12.2014.10.13.07.02.44 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Oct 2014 07:02:46 -0700 (PDT) From: Ulf Hansson <ulf.hansson@linaro.org> To: "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>, linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be>, Kevin Hilman <khilman@linaro.org>, Alan Stern <stern@rowland.harvard.edu>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Tomasz Figa <tomasz.figa@gmail.com>, Simon Horman <horms@verge.net.au>, Magnus Damm <magnus.damm@gmail.com>, Ben Dooks <ben-linux@fluff.org>, Kukjin Kim <kgene.kim@samsung.com>, Philipp Zabel <philipp.zabel@gmail.com>, Mark Brown <broonie@kernel.org>, Wolfram Sang <wsa@the-dreams.de>, Russell King <linux@arm.linux.org.uk>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Jack Dai <jack.dai@rock-chips.com>, Jinkun Hong <jinkun.hong@rock-chips.com>, Aaron Lu <aaron.lu@intel.com>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Ulf Hansson <ulf.hansson@linaro.org> Subject: [PATCH v3 8/9] mmmc: core: Keep PM domain powered during ->probe() of SDIO func driver Date: Mon, 13 Oct 2014 16:02:09 +0200 Message-Id: <1413208930-26019-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413208930-26019-1-git-send-email-ulf.hansson@linaro.org> References: <1413208930-26019-1-git-send-email-ulf.hansson@linaro.org> 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.173 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: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index ba97779..83c8836 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -318,7 +318,14 @@ int sdio_add_func(struct sdio_func *func) if (ret) return ret; + ret = dev_pm_domain_get(func->dev.pm_domain); + if (ret) { + dev_pm_domain_detach(&func->dev, false); + return ret; + } + ret = device_add(&func->dev); + dev_pm_domain_put(func->dev.pm_domain); if (ret) { dev_pm_domain_detach(&func->dev, false); return ret;
To sucessfully probe some devices their corresponding PM domains may need to be powered. Use the dev_pm_domain_get|put() APIs, to control the behavior of the PM domain. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/mmc/core/sdio_bus.c | 7 +++++++ 1 file changed, 7 insertions(+)