From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:44704 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752678Ab0HKNTm (ORCPT ); Wed, 11 Aug 2010 09:19:42 -0400 From: Ohad Ben-Cohen To: , Cc: , Luciano Coelho , , Ido Yariv , San Mehat , Roger Quadros , Nicolas Pitre , Gao Yunpeng , Ohad Ben-Cohen Subject: [RFC/PATCH 5/6] sdio: enable Runtime PM for SDIO cards Date: Wed, 11 Aug 2010 16:19:29 +0300 Message-Id: <1281532770-27545-6-git-send-email-ohad@wizery.com> In-Reply-To: <1281532770-27545-1-git-send-email-ohad@wizery.com> References: <1281532770-27545-1-git-send-email-ohad@wizery.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: Before adding SDIO functions, indicate to the runtime pm core the card is active, and enable runtime pm. The power will be released automatically if the card will be idle. Signed-off-by: Ohad Ben-Cohen --- drivers/mmc/core/sdio.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index ddbb9d3..498fdfb 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -610,6 +611,9 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr) if (err) goto remove_added; + pm_runtime_set_active(&host->card->dev); + pm_runtime_enable(&host->card->dev); + /* * ...then the SDIO functions. */ -- 1.7.0.4