[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200306103857.23962-9-nsaenzjulienne@suse.de>
Date: Fri, 6 Mar 2020 11:38:53 +0100
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: devicetree@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-mmc@...r.kernel.org,
Adrian Hunter <adrian.hunter@...el.com>
Cc: ulf.hansson@...aro.org, f.fainelli@...il.com, phil@...pberrypi.org,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
linux-kernel@...r.kernel.org
Subject: [PATCH 08/10] mmc: sdhci: Unexport sdhci_set_power_noreg()
There are no users left and, ideally, it's not a function that should be
called outside of the core sdhci code.
As sdhci_set_power_reg() depends on sdhci_set_power_noreg() it was moved
underneath it.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
---
drivers/mmc/host/sdhci.c | 39 +++++++++++++++++++--------------------
drivers/mmc/host/sdhci.h | 2 --
2 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c7fd87447457..728442b129f4 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1913,25 +1913,7 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
}
EXPORT_SYMBOL_GPL(sdhci_set_clock);
-static void sdhci_set_power_reg(struct sdhci_host *host, unsigned char mode,
- unsigned short vdd)
-{
- struct mmc_host *mmc = host->mmc;
-
- mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
-
- if (host->quirks2 & SDHCI_QUIRK2_SET_BUS_VOLTAGE) {
- sdhci_set_power_noreg(host, mode, vdd);
- return;
- }
-
- if (mode != MMC_POWER_OFF)
- sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
- else
- sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
-}
-
-void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
+static void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
unsigned short vdd)
{
u8 pwr = 0;
@@ -2003,7 +1985,24 @@ void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
mdelay(10);
}
}
-EXPORT_SYMBOL_GPL(sdhci_set_power_noreg);
+
+static void sdhci_set_power_reg(struct sdhci_host *host, unsigned char mode,
+ unsigned short vdd)
+{
+ struct mmc_host *mmc = host->mmc;
+
+ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
+
+ if (host->quirks2 & SDHCI_QUIRK2_SET_BUS_VOLTAGE) {
+ sdhci_set_power_noreg(host, mode, vdd);
+ return;
+ }
+
+ if (mode != MMC_POWER_OFF)
+ sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
+ else
+ sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
+}
void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
unsigned short vdd)
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 9531a4e5b148..330557434519 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -774,8 +774,6 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock);
void sdhci_enable_clk(struct sdhci_host *host, u16 clk);
void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
unsigned short vdd);
-void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
- unsigned short vdd);
void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq);
void sdhci_set_bus_width(struct sdhci_host *host, int width);
void sdhci_reset(struct sdhci_host *host, u8 mask);
--
2.25.1
Powered by blists - more mailing lists