From patchwork Sun Jan 17 01:33:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 73460 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0H1YYow022644 for ; Sun, 17 Jan 2010 01:34:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287Ab0AQBed (ORCPT ); Sat, 16 Jan 2010 20:34:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753288Ab0AQBed (ORCPT ); Sat, 16 Jan 2010 20:34:33 -0500 Received: from smtp.nokia.com ([192.100.105.134]:37165 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753271Ab0AQBec (ORCPT ); Sat, 16 Jan 2010 20:34:32 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0H1Y7G0013987; Sat, 16 Jan 2010 19:34:08 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 17 Jan 2010 03:34:06 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Sun, 17 Jan 2010 03:34:06 +0200 Received: from ahunter-work.research.nokia.com (essapo-nirac25346.europe.nokia.com [10.162.253.46]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0H1Xwc4017934; Sun, 17 Jan 2010 03:34:00 +0200 From: Adrian Hunter To: Tony Lindgren Cc: Adrian Hunter , Madhusudhan Chikkature , Paul Walmsley , linux-omap Mailing List , linux-mmc Mailing List , Andrew Morton Date: Sun, 17 Jan 2010 03:33:58 +0200 Message-Id: <20100117013358.17308.45866.sendpatchset@ahunter-work.research.nokia.com> In-Reply-To: <20100117013250.17308.17861.sendpatchset@ahunter-work.research.nokia.com> References: <20100117013250.17308.17861.sendpatchset@ahunter-work.research.nokia.com> Subject: [PATCH V2 9/10] omap_hsmmc: Ensure regulator enable / disable are paired X-OriginalArrivalTime: 17 Jan 2010 01:34:06.0657 (UTC) FILETIME=[28B57B10:01CA9715] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index cb94044..d2fad58 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -296,11 +296,8 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on, ret = mmc_regulator_set_ocr(host->vcc, 0); } } else { - if (host->vcc_aux) { - ret = regulator_is_enabled(host->vcc_aux); - if (ret > 0) - ret = regulator_disable(host->vcc_aux); - } + if (host->vcc_aux) + ret = regulator_disable(host->vcc_aux); if (ret == 0) ret = mmc_regulator_set_ocr(host->vcc, 0); } @@ -1975,7 +1972,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) host->slot_id = 0; host->mapbase = res->start; host->base = ioremap(host->mapbase, SZ_4K); - host->power_mode = -1; + host->power_mode = MMC_POWER_OFF; platform_set_drvdata(pdev, host); INIT_WORK(&host->mmc_carddetect_work, omap_hsmmc_detect);