From patchwork Fri May 6 09:14:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 761392 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p469Ff02006086 for ; Fri, 6 May 2011 09:15:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755934Ab1EFJPh (ORCPT ); Fri, 6 May 2011 05:15:37 -0400 Received: from smtp.nokia.com ([147.243.128.24]:45653 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755860Ab1EFJPe (ORCPT ); Fri, 6 May 2011 05:15:34 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da01.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p469ESqa017632; Fri, 6 May 2011 12:14:28 +0300 Received: from localhost.localdomain ([helruo-dhcp022207.ntc.nokia.com [172.21.22.207]]) by mgw-da01.nokia.com with RELAY id p469EHdr017428 ; Fri, 6 May 2011 12:14:23 +0300 From: Adrian Hunter To: Tony Lindgren Cc: Madhusudhan Chikkature , linux-omap Mailing List , linux-mmc Mailing List , linux-arm Mailing List , Sudhir Bera , Adrian Hunter Subject: [PATCH V2 01/16] mmc: omap_hsmmc: fix missing mmc_release_host() in no_off case Date: Fri, 6 May 2011 12:14:00 +0300 Message-Id: <1304673255-31634-2-git-send-email-adrian.hunter@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> References: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 06 May 2011 09:15:41 +0000 (UTC) From: Sudhir Bera In fact the no_off check here will not be hit because 'omap_hsmmc_disabled_to_sleep()' won't schedule a deeper disable in the no_off case. Signed-off-by: Sudhir Bera Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 259ece0..73faaec 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1770,15 +1770,13 @@ static int omap_hsmmc_sleep_to_off(struct omap_hsmmc_host *host) return 0; if (mmc_slot(host).no_off) - return 0; + goto out; if (!((host->mmc->caps & MMC_CAP_NONREMOVABLE) || mmc_slot(host).card_detect || (mmc_slot(host).get_cover_state && - mmc_slot(host).get_cover_state(host->dev, host->slot_id)))) { - mmc_release_host(host->mmc); - return 0; - } + mmc_slot(host).get_cover_state(host->dev, host->slot_id)))) + goto out; mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0); host->vdd = 0; @@ -1788,7 +1786,7 @@ static int omap_hsmmc_sleep_to_off(struct omap_hsmmc_host *host) host->dpm_state == CARDSLEEP ? "CARDSLEEP" : "REGSLEEP"); host->dpm_state = OFF; - +out: mmc_release_host(host->mmc); return 0;