diff mbox

mmc: clear MMC_PM_KEEP_POWER flag on resume

Message ID 1304929951-30326-1-git-send-email-eliad@wizery.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eliad Peller May 9, 2011, 8:32 a.m. UTC
Since the MMC_PM_KEEP_POWER flag should be set on each suspend,
it should also cleared on each resume.

Upon resuming, we have to know if power was kept
(for re-initialization, etc.), so clear it just after resuming.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 drivers/mmc/core/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Chris Ball May 12, 2011, 10:19 p.m. UTC | #1
Hi, (adding Nico to CC in case he has comments)

On Mon, May 09 2011, Eliad Peller wrote:
> Since the MMC_PM_KEEP_POWER flag should be set on each suspend,
> it should also cleared on each resume.
>
> Upon resuming, we have to know if power was kept
> (for re-initialization, etc.), so clear it just after resuming.
>
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
>  drivers/mmc/core/core.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index c2350e4..99941eb 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1789,6 +1789,7 @@ int mmc_resume_host(struct mmc_host *host)
>  			err = 0;
>  		}
>  	}
> +	host->pm_flags &= ~MMC_PM_KEEP_POWER;
>  	mmc_bus_put(host);
>  
>  	return err;

Thanks, this looks correct to me, pushed to mmc-next for .40.

- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index c2350e4..99941eb 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1789,6 +1789,7 @@  int mmc_resume_host(struct mmc_host *host)
 			err = 0;
 		}
 	}
+	host->pm_flags &= ~MMC_PM_KEEP_POWER;
 	mmc_bus_put(host);
 
 	return err;