Skip to content

Commit da012e1

Browse files
Wolfram Sangstorulf
authored andcommitted
mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd()
mmc_can_* 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b89d05f commit da012e1

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

drivers/mmc/core/slot-gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config)
228228
}
229229
EXPORT_SYMBOL(mmc_gpiod_set_cd_config);
230230

231-
bool mmc_can_gpio_cd(struct mmc_host *host)
231+
bool mmc_host_can_gpio_cd(struct mmc_host *host)
232232
{
233233
struct mmc_gpio *ctx = host->slot.handler_priv;
234234

235235
return ctx->cd_gpio ? true : false;
236236
}
237-
EXPORT_SYMBOL(mmc_can_gpio_cd);
237+
EXPORT_SYMBOL(mmc_host_can_gpio_cd);
238238

239239
/**
240240
* mmc_gpiod_request_ro - request a gpio descriptor for write protection

drivers/mmc/host/dw_mmc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3622,7 +3622,7 @@ int dw_mci_runtime_suspend(struct device *dev)
36223622
clk_disable_unprepare(host->ciu_clk);
36233623

36243624
if (host->slot &&
3625-
(mmc_can_gpio_cd(host->slot->mmc) ||
3625+
(mmc_host_can_gpio_cd(host->slot->mmc) ||
36263626
!mmc_card_is_removable(host->slot->mmc)))
36273627
clk_disable_unprepare(host->biu_clk);
36283628

@@ -3636,7 +3636,7 @@ int dw_mci_runtime_resume(struct device *dev)
36363636
struct dw_mci *host = dev_get_drvdata(dev);
36373637

36383638
if (host->slot &&
3639-
(mmc_can_gpio_cd(host->slot->mmc) ||
3639+
(mmc_host_can_gpio_cd(host->slot->mmc) ||
36403640
!mmc_card_is_removable(host->slot->mmc))) {
36413641
ret = clk_prepare_enable(host->biu_clk);
36423642
if (ret)
@@ -3690,7 +3690,7 @@ int dw_mci_runtime_resume(struct device *dev)
36903690

36913691
err:
36923692
if (host->slot &&
3693-
(mmc_can_gpio_cd(host->slot->mmc) ||
3693+
(mmc_host_can_gpio_cd(host->slot->mmc) ||
36943694
!mmc_card_is_removable(host->slot->mmc)))
36953695
clk_disable_unprepare(host->biu_clk);
36963696

drivers/mmc/host/mtk-sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3034,7 +3034,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
30343034
mmc->f_min = DIV_ROUND_UP(host->src_clk_freq, 4 * 4095);
30353035

30363036
if (!(mmc->caps & MMC_CAP_NONREMOVABLE) &&
3037-
!mmc_can_gpio_cd(mmc) &&
3037+
!mmc_host_can_gpio_cd(mmc) &&
30383038
host->dev_comp->use_internal_cd) {
30393039
/*
30403040
* Is removable but no GPIO declared, so

drivers/mmc/host/sdhci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
158158
u32 present;
159159

160160
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
161-
!mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc))
161+
!mmc_card_is_removable(host->mmc) || mmc_host_can_gpio_cd(host->mmc))
162162
return;
163163

164164
if (enable) {
@@ -3744,7 +3744,7 @@ static bool sdhci_cd_irq_can_wakeup(struct sdhci_host *host)
37443744
{
37453745
return mmc_card_is_removable(host->mmc) &&
37463746
!(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
3747-
!mmc_can_gpio_cd(host->mmc);
3747+
!mmc_host_can_gpio_cd(host->mmc);
37483748
}
37493749

37503750
/*

drivers/mmc/host/sunplus-mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ static int spmmc_get_cd(struct mmc_host *mmc)
791791
{
792792
int ret = 0;
793793

794-
if (mmc_can_gpio_cd(mmc))
794+
if (mmc_host_can_gpio_cd(mmc))
795795
ret = mmc_gpio_get_cd(mmc);
796796

797797
if (ret < 0)

drivers/mmc/host/tmio_mmc_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,11 +1179,11 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
11791179
if (mmc_can_gpio_ro(mmc))
11801180
_host->ops.get_ro = mmc_gpio_get_ro;
11811181

1182-
if (mmc_can_gpio_cd(mmc))
1182+
if (mmc_host_can_gpio_cd(mmc))
11831183
_host->ops.get_cd = mmc_gpio_get_cd;
11841184

11851185
/* must be set before tmio_mmc_reset() */
1186-
_host->native_hotplug = !(mmc_can_gpio_cd(mmc) ||
1186+
_host->native_hotplug = !(mmc_host_can_gpio_cd(mmc) ||
11871187
mmc->caps & MMC_CAP_NEEDS_POLL ||
11881188
!mmc_card_is_removable(mmc));
11891189

include/linux/mmc/slot-gpio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
2424
int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config);
2525
int mmc_gpio_set_cd_wake(struct mmc_host *host, bool on);
2626
void mmc_gpiod_request_cd_irq(struct mmc_host *host);
27-
bool mmc_can_gpio_cd(struct mmc_host *host);
27+
bool mmc_host_can_gpio_cd(struct mmc_host *host);
2828
bool mmc_can_gpio_ro(struct mmc_host *host);
2929

3030
#endif

0 commit comments

Comments
 (0)