From patchwork Sat Feb 4 14:51:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 6657 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1D12A23E0E for ; Sat, 4 Feb 2012 14:52:04 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id D90FCA18238 for ; Sat, 4 Feb 2012 14:52:03 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so8410368iab.11 for ; Sat, 04 Feb 2012 06:52:03 -0800 (PST) Received: by 10.50.236.5 with SMTP id uq5mr2737318igc.13.1328367123685; Sat, 04 Feb 2012 06:52:03 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.169.210 with SMTP id a18cs44990ibz; Sat, 4 Feb 2012 06:52:03 -0800 (PST) Received: by 10.101.155.22 with SMTP id h22mr5029416ano.0.1328367119717; Sat, 04 Feb 2012 06:51:59 -0800 (PST) Received: from comal.ext.ti.com (comal.ext.ti.com. [198.47.26.152]) by mx.google.com with ESMTPS id s61si10129954yhn.49.2012.02.04.06.51.59 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Feb 2012 06:51:59 -0800 (PST) Received-SPF: neutral (google.com: 198.47.26.152 is neither permitted nor denied by best guess record for domain of a0131687@ula0131687) client-ip=198.47.26.152; Authentication-Results: mx.google.com; spf=neutral (google.com: 198.47.26.152 is neither permitted nor denied by best guess record for domain of a0131687@ula0131687) smtp.mail=a0131687@ula0131687 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q14EpsQt005163; Sat, 4 Feb 2012 08:51:55 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q14EpntF018204; Sat, 4 Feb 2012 20:21:54 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Sat, 4 Feb 2012 20:21:49 +0530 Received: from ula0131687 (h81-226.vpn.ti.com [172.24.81.226]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id q14EplgP009873; Sat, 4 Feb 2012 20:21:47 +0530 (IST) Received: from a0131687 by ula0131687 with local (Exim 4.72) (envelope-from ) id 1Rtgxs-0002iW-Do; Sat, 04 Feb 2012 20:21:44 +0530 From: Rajendra Nayak To: , , CC: , , , , , Rajendra Nayak Subject: [PATCH 4/6] mmc: omap_hsmmc: Get rid of omap_hsmmc_1_set_power function Date: Sat, 4 Feb 2012 20:21:28 +0530 Message-ID: <1328367090-10402-5-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1328367090-10402-1-git-send-email-rnayak@ti.com> References: <1328367090-10402-1-git-send-email-rnayak@ti.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmQKE6C4RZZEf7PVLQ6sSuR8cTb5uru6Fqe4r70e96jiOxmCoa3qkRYXAL7eNMvC3ZakFjK Use omap_hsmmc_235_set_power() (now renamed as omap_hsmmc_set_power()) for MMC1 instance as well and get rid of omap_hsmmc_1_set_power() completely. omap_hsmmc_235_set_power() seems to implemented as a superset of omap_hsmmc_1_set_power() with additonal functionality based on additional checks and hence should just work for MMC1 as well. Signed-off-by: Rajendra Nayak --- drivers/mmc/host/omap_hsmmc.c | 30 +++--------------------------- 1 files changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 91faf42..f98c599 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -241,28 +241,7 @@ static int omap_hsmmc_resume_cdirq(struct device *dev, int slot) #ifdef CONFIG_REGULATOR -static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on, - int vdd) -{ - struct omap_hsmmc_host *host = - platform_get_drvdata(to_platform_device(dev)); - int ret; - - if (mmc_slot(host).before_set_reg) - mmc_slot(host).before_set_reg(dev, slot, power_on, vdd); - - if (power_on) - ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd); - else - ret = mmc_regulator_set_ocr(host->mmc, host->vcc, 0); - - if (mmc_slot(host).after_set_reg) - mmc_slot(host).after_set_reg(dev, slot, power_on, vdd); - - return ret; -} - -static int omap_hsmmc_235_set_power(struct device *dev, int slot, int power_on, +static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on, int vdd) { struct omap_hsmmc_host *host = @@ -332,14 +311,11 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) switch (host->id) { case OMAP_MMC1_DEVID: - /* On-chip level shifting via PBIAS0/PBIAS1 */ - mmc_slot(host).set_power = omap_hsmmc_1_set_power; - break; case OMAP_MMC2_DEVID: case OMAP_MMC3_DEVID: case OMAP_MMC5_DEVID: - /* Off-chip level shifting, or none */ - mmc_slot(host).set_power = omap_hsmmc_235_set_power; + /* On-chip level shifting via PBIAS0/PBIAS1 */ + mmc_slot(host).set_power = omap_hsmmc_set_power; break; case OMAP_MMC4_DEVID: mmc_slot(host).set_power = omap_hsmmc_4_set_power;