From patchwork Thu Aug 5 08:10: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: 176362 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Thu, 05 Aug 2010 09:11:17 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1OgvXo-0001lo-Ny for chris@printf.net; Thu, 05 Aug 2010 09:11:16 +0100 Received: by mail.laptop.org (Postfix) id C50852388E; Thu, 5 Aug 2010 04:10:58 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id A26E523886 for ; Thu, 5 Aug 2010 04:10:58 -0400 (EDT) X-ASG-Debug-ID: 1280995873-3563efdc0002-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id sDN4WTzTm9BfSNUW for ; Thu, 05 Aug 2010 04:11:14 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759930Ab0HEILM (ORCPT ); Thu, 5 Aug 2010 04:11:12 -0400 Received: from smtp.nokia.com ([192.100.122.230]:36803 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759929Ab0HEILK (ORCPT ); Thu, 5 Aug 2010 04:11:10 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o758AjPp016988; Thu, 5 Aug 2010 11:10:55 +0300 Received: from vaepf101.NOE.Nokia.com ([10.160.244.86]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 Aug 2010 11:10:49 +0300 Received: from [172.21.40.78] ([172.21.40.78]) by vaepf101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 Aug 2010 11:10:49 +0300 Message-ID: <4C5A7212.6070207@nokia.com> Date: Thu, 05 Aug 2010 11:10:58 +0300 From: Adrian Hunter User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Andrew Morton CC: "linux-mmc@vger.kernel.org" X-ASG-Orig-Subj: [PATCH] omap_hsmmc: remove 'UGLY HACK: workaround regulator framework bugs' Subject: [PATCH] omap_hsmmc: remove 'UGLY HACK: workaround regulator framework bugs' X-OriginalArrivalTime: 05 Aug 2010 08:10:49.0300 (UTC) FILETIME=[B6CE9140:01CB3475] X-Nokia-AV: Clean Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1280995874 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.37085 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4a8776f..6bdae60 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -401,25 +401,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) /* Allow an aux regulator */ reg = regulator_get(host->dev, "vmmc_aux"); host->vcc_aux = IS_ERR(reg) ? NULL : reg; - - /* - * UGLY HACK: workaround regulator framework bugs. - * When the bootloader leaves a supply active, it's - * initialized with zero usecount ... and we can't - * disable it without first enabling it. Until the - * framework is fixed, we need a workaround like this - * (which is safe for MMC, but not in general). - */ - if (regulator_is_enabled(host->vcc) > 0) { - regulator_enable(host->vcc); - regulator_disable(host->vcc); - } - if (host->vcc_aux) { - if (regulator_is_enabled(reg) > 0) { - regulator_enable(reg); - regulator_disable(reg); - } - } } return 0;