[PATCH 11/11] mmc: rename mmc_retune_needed() to mmc_host_retune_needed()
Wolfram Sang
wsa+renesas at sang-engineering.com
Fri Apr 25 04:14:07 PDT 2025
mmc_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'host'.
Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
---
drivers/mmc/core/core.c | 4 ++--
drivers/mmc/core/host.c | 2 +-
drivers/mmc/core/mmc_test.c | 2 +-
drivers/mmc/core/sdio.c | 2 +-
drivers/mmc/host/sdhci-acpi.c | 4 ++--
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
drivers/mmc/host/sdhci-of-arasan.c | 2 +-
drivers/mmc/host/sdhci-of-at91.c | 2 +-
drivers/mmc/host/sdhci-of-esdhc.c | 2 +-
drivers/mmc/host/sdhci-omap.c | 2 +-
drivers/mmc/host/sdhci-pci-core.c | 6 +++---
drivers/mmc/host/sdhci-pltfm.c | 2 +-
drivers/mmc/host/sdhci-pxav3.c | 4 ++--
drivers/mmc/host/sdhci-s3c.c | 4 ++--
drivers/mmc/host/sdhci-spear.c | 2 +-
drivers/mmc/host/sdhci-st.c | 2 +-
drivers/mmc/host/sdhci-xenon.c | 2 +-
drivers/mmc/host/sdhci.c | 2 +-
drivers/mmc/host/sdhci_am654.c | 2 +-
drivers/mmc/host/tmio_mmc_core.c | 4 ++--
include/linux/mmc/host.h | 2 +-
21 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 960d7f4a3503..c770a2835f23 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -146,7 +146,7 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
(err == -EILSEQ || (mrq->sbc && mrq->sbc->error == -EILSEQ) ||
(mrq->data && mrq->data->error == -EILSEQ) ||
(mrq->stop && mrq->stop->error == -EILSEQ)))
- mmc_retune_needed(host);
+ mmc_host_retune_needed(host);
if (err && cmd->retries && mmc_host_is_spi(host)) {
if (cmd->resp[0] & R1_SPI_ILLEGAL_COMMAND)
@@ -493,7 +493,7 @@ void mmc_cqe_request_done(struct mmc_host *host, struct mmc_request *mrq)
/* Flag re-tuning needed on CRC errors */
if ((mrq->cmd && mrq->cmd->error == -EILSEQ) ||
(mrq->data && mrq->data->error == -EILSEQ))
- mmc_retune_needed(host);
+ mmc_host_retune_needed(host);
trace_mmc_request_done(host, mrq);
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 651c62ea0848..c9c67716d665 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -214,7 +214,7 @@ static void mmc_retune_timer(struct timer_list *t)
{
struct mmc_host *host = from_timer(host, t, retune_timer);
- mmc_retune_needed(host);
+ mmc_host_retune_needed(host);
}
static void mmc_of_parse_timing_phase(struct device *dev, const char *prop,
diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c
index 503e4b2a7424..0293f2b7a9c8 100644
--- a/drivers/mmc/core/mmc_test.c
+++ b/drivers/mmc/core/mmc_test.c
@@ -1930,7 +1930,7 @@ static int mmc_test_rnd_perf(struct mmc_test_card *test, int write, int print,
dev_addr = rnd_addr + test->card->pref_erase * ea +
ssz * mmc_test_rnd_num(range2);
if (force_retuning)
- mmc_retune_needed(test->card->host);
+ mmc_host_retune_needed(test->card->host);
ret = mmc_test_area_io(test, sz, dev_addr, write, 0, 0);
if (ret)
return ret;
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 3fa1bae6845c..bd2104e0f13c 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -1056,7 +1056,7 @@ static int mmc_sdio_suspend(struct mmc_host *host)
mmc_power_off(host);
} else if (host->retune_period) {
mmc_retune_timer_stop(host);
- mmc_retune_needed(host);
+ mmc_host_retune_needed(host);
}
mmc_release_host(host);
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index e6c5c82f64fa..630868203f9e 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -1001,7 +1001,7 @@ static int sdhci_acpi_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
if (ret)
@@ -1031,7 +1031,7 @@ static int sdhci_acpi_runtime_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_runtime_suspend_host(host);
if (ret)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index b977d37e2684..2d78d7676967 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -2016,11 +2016,11 @@ static int sdhci_esdhc_suspend(struct device *dev)
if ((imx_data->socdata->flags & ESDHC_FLAG_STATE_LOST_IN_LPMODE) &&
(host->tuning_mode != SDHCI_TUNING_MODE_1)) {
mmc_retune_timer_stop(host->mmc);
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
}
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
/*
* For the device need to keep power during system PM, need
@@ -2099,7 +2099,7 @@ static int sdhci_esdhc_runtime_suspend(struct device *dev)
return ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
imx_data->actual_clock = host->mmc->actual_clock;
esdhc_pltfm_set_clock(host, 0);
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 8c29676ab662..979f19fd95f4 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -598,7 +598,7 @@ static int sdhci_arasan_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
if (sdhci_arasan->has_cqe) {
ret = cqhci_suspend(host->mmc);
diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
index 97988ed37467..8b36cdc6cf81 100644
--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -256,7 +256,7 @@ static int sdhci_at91_runtime_suspend(struct device *dev)
ret = sdhci_runtime_suspend_host(host);
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
clk_disable_unprepare(priv->gck);
clk_disable_unprepare(priv->hclock);
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 002d0d59b992..829491c59d09 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -1243,7 +1243,7 @@ static int esdhc_of_suspend(struct device *dev)
esdhc_proctl = sdhci_readl(host, SDHCI_HOST_CONTROL);
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
return sdhci_suspend_host(host);
}
diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
index 8897839ab2aa..98111e4253ec 100644
--- a/drivers/mmc/host/sdhci-omap.c
+++ b/drivers/mmc/host/sdhci-omap.c
@@ -1440,7 +1440,7 @@ static int __maybe_unused sdhci_omap_runtime_suspend(struct device *dev)
struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host);
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
if (omap_host->con != -EINVAL)
sdhci_runtime_suspend_host(host);
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 13a84b9309e0..b4b355f41bfa 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -86,7 +86,7 @@ static int sdhci_pci_suspend_host(struct sdhci_pci_chip *chip)
host = slot->host;
if (chip->pm_retune && host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
if (ret)
@@ -167,7 +167,7 @@ static int sdhci_pci_runtime_suspend_host(struct sdhci_pci_chip *chip)
if (chip->rpm_retune &&
host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
}
return 0;
@@ -1035,7 +1035,7 @@ static void glk_rpm_retune_wa(struct sdhci_pci_chip *chip, bool susp)
intel_host->rpm_retune_ok = true;
chip->rpm_retune = true;
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
pr_info("%s: Requiring re-tune after rpm resume", mmc_hostname(host->mmc));
}
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 62753d72198a..845f700dd454 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -193,7 +193,7 @@ int sdhci_pltfm_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
if (ret)
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 3fb56face3d8..ab83a39feed0 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -497,7 +497,7 @@ static int sdhci_pxav3_suspend(struct device *dev)
pm_runtime_get_sync(dev);
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
@@ -532,7 +532,7 @@ static int sdhci_pxav3_runtime_suspend(struct device *dev)
return ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
clk_disable_unprepare(pxa->clk_io);
if (!IS_ERR(pxa->clk_core))
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index bdf4dc0d6b77..a9524a0d7adc 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -695,7 +695,7 @@ static int sdhci_s3c_suspend(struct device *dev)
struct sdhci_host *host = dev_get_drvdata(dev);
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
return sdhci_suspend_host(host);
}
@@ -719,7 +719,7 @@ static int sdhci_s3c_runtime_suspend(struct device *dev)
ret = sdhci_runtime_suspend_host(host);
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
if (ourhost->cur_clk >= 0)
clk_disable_unprepare(ourhost->clk_bus[ourhost->cur_clk]);
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 770dc12b9ae9..c192c7d284b8 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -141,7 +141,7 @@ static int sdhci_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
if (!ret)
diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
index 4973e08a98f8..bfeb680d4be9 100644
--- a/drivers/mmc/host/sdhci-st.c
+++ b/drivers/mmc/host/sdhci-st.c
@@ -456,7 +456,7 @@ static int sdhci_st_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
if (ret)
diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
index 098f0ea45cbe..48b00b82d361 100644
--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -655,7 +655,7 @@ static int xenon_runtime_suspend(struct device *dev)
return ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
clk_disable_unprepare(pltfm_host->clk);
/*
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index fd5681d1e31f..fa1924657ed6 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3635,7 +3635,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
mmc_hostname(host->mmc));
if (intmask & SDHCI_INT_RETUNE)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
if ((intmask & SDHCI_INT_CARD_INT) &&
(host->ier & SDHCI_INT_CARD_INT)) {
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index f75c31815ab0..ffd40733d71c 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -1043,7 +1043,7 @@ static int sdhci_am654_runtime_suspend(struct device *dev)
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
ret = cqhci_suspend(host->mmc);
if (ret)
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index b71241f55df5..a2b35c1c8b62 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -224,7 +224,7 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host, bool preserve)
}
if (host->mmc->card)
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
}
static void tmio_mmc_reset_work(struct work_struct *work)
@@ -852,7 +852,7 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
/* Error means retune, but executed command was still successful */
if (host->check_retune && host->check_retune(host, mrq))
- mmc_retune_needed(host->mmc);
+ mmc_host_retune_needed(host->mmc);
/* If SET_BLOCK_COUNT, continue with main command */
if (host->mrq && !mrq->cmd->error) {
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 68f09a955a90..e49a3f502ecf 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -699,7 +699,7 @@ static inline bool mmc_card_uhs2(struct mmc_host *host)
void mmc_retune_timer_stop(struct mmc_host *host);
-static inline void mmc_retune_needed(struct mmc_host *host)
+static inline void mmc_host_retune_needed(struct mmc_host *host)
{
if (host->can_retune)
host->need_retune = 1;
--
2.47.2
More information about the linux-arm-kernel
mailing list