Skip to content

Commit f55f7da

Browse files
Wolfram Sangstorulf
authored andcommitted
mmc: rename mmc_host_uhs() to mmc_host_can_uhs()
It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent dc03e2e commit f55f7da

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

drivers/mmc/core/host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static inline int mmc_boot_partition_access(struct mmc_host *host)
5454
return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC);
5555
}
5656

57-
static inline int mmc_host_uhs(struct mmc_host *host)
57+
static inline int mmc_host_can_uhs(struct mmc_host *host)
5858
{
5959
return host->caps &
6060
(MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |

drivers/mmc/core/sd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static void sd_update_bus_speed_mode(struct mmc_card *card)
455455
* If the host doesn't support any of the UHS-I modes, fallback on
456456
* default speed.
457457
*/
458-
if (!mmc_host_uhs(card->host)) {
458+
if (!mmc_host_can_uhs(card->host)) {
459459
card->sd_bus_speed = 0;
460460
return;
461461
}
@@ -867,7 +867,7 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr)
867867
* to switch to 1.8V signaling level. If the card has failed
868868
* repeatedly to switch however, skip this.
869869
*/
870-
if (retries && mmc_host_uhs(host))
870+
if (retries && mmc_host_can_uhs(host))
871871
ocr |= SD_OCR_S18R;
872872

873873
/*
@@ -1509,7 +1509,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
15091509
* signaling. Detect that situation and try to initialize a UHS-I (1.8V)
15101510
* transfer mode.
15111511
*/
1512-
if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_uhs(host) &&
1512+
if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_can_uhs(host) &&
15131513
mmc_sd_card_using_v18(card) &&
15141514
host->ios.signal_voltage != MMC_SIGNAL_VOLTAGE_180) {
15151515
if (mmc_host_set_uhs_voltage(host) ||
@@ -1524,7 +1524,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
15241524
}
15251525

15261526
/* Initialization sequence for UHS-I cards */
1527-
if (rocr & SD_ROCR_S18A && mmc_host_uhs(host)) {
1527+
if (rocr & SD_ROCR_S18A && mmc_host_can_uhs(host)) {
15281528
err = mmc_sd_init_uhs_card(card);
15291529
if (err)
15301530
goto free_card;

drivers/mmc/core/sdio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int sdio_read_cccr(struct mmc_card *card, u32 ocr)
198198
if (ret)
199199
goto out;
200200

201-
if (mmc_host_uhs(card->host)) {
201+
if (mmc_host_can_uhs(card->host)) {
202202
if (data & SDIO_UHS_DDR50)
203203
card->sw_caps.sd3_bus_mode
204204
|= SD_MODE_UHS_DDR50 | SD_MODE_UHS_SDR50
@@ -527,7 +527,7 @@ static int sdio_set_bus_speed_mode(struct mmc_card *card)
527527
* If the host doesn't support any of the UHS-I modes, fallback on
528528
* default speed.
529529
*/
530-
if (!mmc_host_uhs(card->host))
530+
if (!mmc_host_can_uhs(card->host))
531531
return 0;
532532

533533
bus_speed = SDIO_SPEED_SDR12;
@@ -669,7 +669,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
669669
WARN_ON(!host->claimed);
670670

671671
/* to query card if 1.8V signalling is supported */
672-
if (mmc_host_uhs(host))
672+
if (mmc_host_can_uhs(host))
673673
ocr |= R4_18V_PRESENT;
674674

675675
try_again:

0 commit comments

Comments
 (0)