From patchwork Thu Feb 23 11:26:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 6898 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 ED57923DEE for ; Thu, 23 Feb 2012 11:27:08 +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 B5D7AA18944 for ; Thu, 23 Feb 2012 11:27:08 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so1926108iab.11 for ; Thu, 23 Feb 2012 03:27:08 -0800 (PST) Received: from mr.google.com ([10.50.89.232]) by 10.50.89.232 with SMTP id br8mr1003089igb.30.1329996428586 (num_hops = 1); Thu, 23 Feb 2012 03:27:08 -0800 (PST) Received: by 10.50.89.232 with SMTP id br8mr869162igb.30.1329996428528; Thu, 23 Feb 2012 03:27:08 -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.11.10 with SMTP id r10csp8550ibr; Thu, 23 Feb 2012 03:27:07 -0800 (PST) Received: by 10.236.185.197 with SMTP id u45mr1329696yhm.6.1329996426828; Thu, 23 Feb 2012 03:27:06 -0800 (PST) Received: from devils.ext.ti.com (devils.ext.ti.com. [198.47.26.153]) by mx.google.com with ESMTPS id y1si1146660yha.47.2012.02.23.03.27.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Feb 2012 03:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of rnayak@ti.com designates 198.47.26.153 as permitted sender) client-ip=198.47.26.153; Authentication-Results: mx.google.com; spf=pass (google.com: domain of rnayak@ti.com designates 198.47.26.153 as permitted sender) smtp.mail=rnayak@ti.com Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q1NBR2PN021241; Thu, 23 Feb 2012 05:27:03 -0600 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q1NBR2xi027216; Thu, 23 Feb 2012 16:57:02 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Thu, 23 Feb 2012 16:57:02 +0530 Received: from ula0131687.apr.dhcp.ti.com (ula0131687-172024136255.apr.dhcp.ti.com [172.24.136.255]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id q1NBQr74023412; Thu, 23 Feb 2012 16:57:01 +0530 (IST) From: Rajendra Nayak To: , , CC: , , , , , Rajendra Nayak Subject: [PATCH v2 4/6] mmc: omap_hsmmc: Get rid of omap_hsmmc_1_set_power function Date: Thu, 23 Feb 2012 16:56:47 +0530 Message-ID: <1329996409-26861-5-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1329996409-26861-1-git-send-email-rnayak@ti.com> References: <1329996409-26861-1-git-send-email-rnayak@ti.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnRB1aj4y0DAOpxqx4ChomygCuKE3vu21bW7IuUNqliuyRJHcyU/sWZ/gnZJ7dDA0LDiD14 Use omap_hsmmc_235_set_poweri() (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 implemented based on additional checks and hence should just work for MMC1 as well. Signed-off-by: Rajendra Nayak Tested-by: Venkatraman S Tested-by: Balaji T K --- 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;