Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:49491 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756529Ab0IGL3t (ORCPT ); Tue, 7 Sep 2010 07:29:49 -0400 From: Ohad Ben-Cohen To: , Cc: Luciano Coelho , , San Mehat , Roger Quadros , Nicolas Pitre , Gao Yunpeng , Ohad Ben-Cohen Subject: [PATCH v1 6/8] sdio: enable Runtime PM for SDIO cards Date: Tue, 7 Sep 2010 14:29:07 +0300 Message-Id: <1283858949-11073-7-git-send-email-ohad@wizery.com> In-Reply-To: <1283858949-11073-1-git-send-email-ohad@wizery.com> References: <1283858949-11073-1-git-send-email-ohad@wizery.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: Enable runtime PM for new SDIO cards. As soon as the card will be added to the device tree, runtime PM core will release its power, since it doesn't have any users yet. Signed-off-by: Ohad Ben-Cohen --- drivers/mmc/core/sdio.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index c118cc2..a5a76a8 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -709,6 +710,15 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr) card = host->card; /* + * Enable Runtime PM for this card + */ + err = pm_runtime_set_active(&card->dev); + if (err) + goto remove; + + pm_runtime_enable(&card->dev); + + /* * The number of functions on the card is encoded inside * the ocr. */ -- 1.7.0.4