Skip to content

Commit 2e1a26e

Browse files
Wolfram Sangstorulf
authored andcommitted
mmc: rename mmc_can_gpio_ro() to mmc_host_can_gpio_ro()
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 da012e1 commit 2e1a26e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

drivers/mmc/core/slot-gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
275275
}
276276
EXPORT_SYMBOL(mmc_gpiod_request_ro);
277277

278-
bool mmc_can_gpio_ro(struct mmc_host *host)
278+
bool mmc_host_can_gpio_ro(struct mmc_host *host)
279279
{
280280
struct mmc_gpio *ctx = host->slot.handler_priv;
281281

282282
return ctx->ro_gpio ? true : false;
283283
}
284-
EXPORT_SYMBOL(mmc_can_gpio_ro);
284+
EXPORT_SYMBOL(mmc_host_can_gpio_ro);

drivers/mmc/host/renesas_sdhi_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
11121112
host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
11131113

11141114
/* For some SoC, we disable internal WP. GPIO may override this */
1115-
if (mmc_can_gpio_ro(host->mmc))
1115+
if (mmc_host_can_gpio_ro(host->mmc))
11161116
mmc_data->capabilities2 &= ~MMC_CAP2_NO_WRITE_PROTECT;
11171117

11181118
/* SDR speeds are only available on Gen2+ */

drivers/mmc/host/sdhci-omap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
12701270
mmc->f_max = 48000000;
12711271
}
12721272

1273-
if (!mmc_can_gpio_ro(mmc))
1273+
if (!mmc_host_can_gpio_ro(mmc))
12741274
mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT;
12751275

12761276
pltfm_host->clk = devm_clk_get(dev, "fck");

drivers/mmc/host/sdhci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,7 @@ int sdhci_get_ro(struct mmc_host *mmc)
25712571
is_readonly = 0;
25722572
} else if (host->ops->get_ro) {
25732573
is_readonly = host->ops->get_ro(host);
2574-
} else if (mmc_can_gpio_ro(mmc)) {
2574+
} else if (mmc_host_can_gpio_ro(mmc)) {
25752575
is_readonly = mmc_gpio_get_ro(mmc);
25762576
/* Do not invert twice */
25772577
allow_invert = !(mmc->caps2 & MMC_CAP2_RO_ACTIVE_HIGH);

drivers/mmc/host/tmio_mmc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
11761176
dma_max_mapping_size(&pdev->dev));
11771177
mmc->max_seg_size = mmc->max_req_size;
11781178

1179-
if (mmc_can_gpio_ro(mmc))
1179+
if (mmc_host_can_gpio_ro(mmc))
11801180
_host->ops.get_ro = mmc_gpio_get_ro;
11811181

11821182
if (mmc_host_can_gpio_cd(mmc))

include/linux/mmc/slot-gpio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ 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);
2727
bool mmc_host_can_gpio_cd(struct mmc_host *host);
28-
bool mmc_can_gpio_ro(struct mmc_host *host);
28+
bool mmc_host_can_gpio_ro(struct mmc_host *host);
2929

3030
#endif

0 commit comments

Comments
 (0)