Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-9-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Wolfram Sang and committed by
Ulf Hansson
f55f7da6 dc03e2e9

+8 -8
+1 -1
drivers/mmc/core/host.h
··· 54 54 return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC); 55 55 } 56 56 57 - static inline int mmc_host_uhs(struct mmc_host *host) 57 + static inline int mmc_host_can_uhs(struct mmc_host *host) 58 58 { 59 59 return host->caps & 60 60 (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
+4 -4
drivers/mmc/core/sd.c
··· 455 455 * If the host doesn't support any of the UHS-I modes, fallback on 456 456 * default speed. 457 457 */ 458 - if (!mmc_host_uhs(card->host)) { 458 + if (!mmc_host_can_uhs(card->host)) { 459 459 card->sd_bus_speed = 0; 460 460 return; 461 461 } ··· 867 867 * to switch to 1.8V signaling level. If the card has failed 868 868 * repeatedly to switch however, skip this. 869 869 */ 870 - if (retries && mmc_host_uhs(host)) 870 + if (retries && mmc_host_can_uhs(host)) 871 871 ocr |= SD_OCR_S18R; 872 872 873 873 /* ··· 1509 1509 * signaling. Detect that situation and try to initialize a UHS-I (1.8V) 1510 1510 * transfer mode. 1511 1511 */ 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) && 1513 1513 mmc_sd_card_using_v18(card) && 1514 1514 host->ios.signal_voltage != MMC_SIGNAL_VOLTAGE_180) { 1515 1515 if (mmc_host_set_uhs_voltage(host) || ··· 1524 1524 } 1525 1525 1526 1526 /* 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)) { 1528 1528 err = mmc_sd_init_uhs_card(card); 1529 1529 if (err) 1530 1530 goto free_card;
+3 -3
drivers/mmc/core/sdio.c
··· 198 198 if (ret) 199 199 goto out; 200 200 201 - if (mmc_host_uhs(card->host)) { 201 + if (mmc_host_can_uhs(card->host)) { 202 202 if (data & SDIO_UHS_DDR50) 203 203 card->sw_caps.sd3_bus_mode 204 204 |= SD_MODE_UHS_DDR50 | SD_MODE_UHS_SDR50 ··· 527 527 * If the host doesn't support any of the UHS-I modes, fallback on 528 528 * default speed. 529 529 */ 530 - if (!mmc_host_uhs(card->host)) 530 + if (!mmc_host_can_uhs(card->host)) 531 531 return 0; 532 532 533 533 bus_speed = SDIO_SPEED_SDR12; ··· 669 669 WARN_ON(!host->claimed); 670 670 671 671 /* to query card if 1.8V signalling is supported */ 672 - if (mmc_host_uhs(host)) 672 + if (mmc_host_can_uhs(host)) 673 673 ocr |= R4_18V_PRESENT; 674 674 675 675 try_again: