From patchwork Thu Feb 23 11:26:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 6897 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 08B5323DEE 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 C4531A1893D for ; Thu, 23 Feb 2012 11:27:07 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so1926093iab.11 for ; Thu, 23 Feb 2012 03:27:07 -0800 (PST) Received: from mr.google.com ([10.50.34.202]) by 10.50.34.202 with SMTP id b10mr835189igj.30.1329996427644 (num_hops = 1); Thu, 23 Feb 2012 03:27:07 -0800 (PST) Received: by 10.50.34.202 with SMTP id b10mr722536igj.30.1329996427577; Thu, 23 Feb 2012 03:27:07 -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 r10csp8549ibr; Thu, 23 Feb 2012 03:27:06 -0800 (PST) Received: by 10.100.245.4 with SMTP id s4mr390655anh.8.1329996425997; Thu, 23 Feb 2012 03:27:05 -0800 (PST) Received: from bear.ext.ti.com (bear.ext.ti.com. [192.94.94.41]) by mx.google.com with ESMTPS id s49si474671yhg.11.2012.02.23.03.27.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Feb 2012 03:27:05 -0800 (PST) Received-SPF: pass (google.com: domain of rnayak@ti.com designates 192.94.94.41 as permitted sender) client-ip=192.94.94.41; Authentication-Results: mx.google.com; spf=pass (google.com: domain of rnayak@ti.com designates 192.94.94.41 as permitted sender) smtp.mail=rnayak@ti.com Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q1NBR33r001855; 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 q1NBR2Id027225; 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 q1NBQr75023412; Thu, 23 Feb 2012 16:57:02 +0530 (IST) From: Rajendra Nayak To: , , CC: , , , , , Rajendra Nayak Subject: [PATCH v2 5/6] mmc: omap_hsmmc: Get rid of omap_hsmmc_4_set_power function Date: Thu, 23 Feb 2012 16:56:48 +0530 Message-ID: <1329996409-26861-6-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: ALoCoQkXU9tj4t9AYGHHQHUC3IieeWLPNHVOmvSolPoz75jVGedBcbKFL9CnXo8LYIDnXdS8+8Sk Now that omap_hsmmc_set_power() already has a check to return 0 if !host->vcc, it seems like it can be used even on MMC4 instead of the dummy omap_hsmmc_4_set_power(). This also helps get rid of all the host->id based check to populate the right function for on-chip/external level shifting and use omap_hsmmc_set_power() for all MMC modules. Signed-off-by: Rajendra Nayak Tested-by: Venkatraman S Tested-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 21 +-------------------- 1 files changed, 1 insertions(+), 20 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index f98c599..17e264b 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -297,32 +297,13 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on, return ret; } -static int omap_hsmmc_4_set_power(struct device *dev, int slot, int power_on, - int vdd) -{ - return 0; -} - static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) { struct regulator *reg; int ret = 0; int ocr_value = 0; - switch (host->id) { - case OMAP_MMC1_DEVID: - case OMAP_MMC2_DEVID: - case OMAP_MMC3_DEVID: - case OMAP_MMC5_DEVID: - /* 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; - default: - pr_err("MMC%d configuration not supported!\n", host->id); - return -EINVAL; - } + mmc_slot(host).set_power = omap_hsmmc_set_power; reg = regulator_get(host->dev, "vmmc"); if (IS_ERR(reg)) {