From: Ohad Ben-Cohen Date: Sat, 2 Oct 2010 11:54:10 +0000 (+0200) Subject: mmc: sdio: enable runtime PM for SDIO cards X-Git-Tag: v2.6.37-rc1~65^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81968561bd69536c82be7ee654b04c68cd3e1746;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git mmc: sdio: enable runtime PM for SDIO cards 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 Tested-by: Luciano Coelho Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index f17e0e0..0dbd6fe 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -708,6 +709,18 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr) card = host->card; /* + * Let runtime PM core know our card is active + */ + err = pm_runtime_set_active(&card->dev); + if (err) + goto remove; + + /* + * Enable runtime PM for this card + */ + pm_runtime_enable(&card->dev); + + /* * The number of functions on the card is encoded inside * the ocr. */