From patchwork Mon May 9 08:32:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 768652 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p498WQwG025261 for ; Mon, 9 May 2011 08:32:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753390Ab1EIIcX (ORCPT ); Mon, 9 May 2011 04:32:23 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:39718 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750959Ab1EIIcX (ORCPT ); Mon, 9 May 2011 04:32:23 -0400 Received: by wya21 with SMTP id 21so3686469wya.19 for ; Mon, 09 May 2011 01:32:22 -0700 (PDT) Received: by 10.216.54.134 with SMTP id i6mr2323259wec.75.1304929942209; Mon, 09 May 2011 01:32:22 -0700 (PDT) Received: from localhost.localdomain (46-116-36-26.bb.netvision.net.il [46.116.36.26]) by mx.google.com with ESMTPS id d59sm2885080wed.21.2011.05.09.01.32.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 May 2011 01:32:21 -0700 (PDT) From: Eliad Peller To: linux-mmc@vger.kernel.org Cc: Chris Ball Subject: [PATCH] mmc: clear MMC_PM_KEEP_POWER flag on resume Date: Mon, 9 May 2011 11:32:31 +0300 Message-Id: <1304929951-30326-1-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 09 May 2011 08:32:27 +0000 (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 --- 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;