]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mmc: rename mmc_can_ext_csd() to mmc_card_can_ext_csd()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 1 Apr 2025 09:58:39 +0000 (11:58 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 14 May 2025 14:59:17 +0000 (16:59 +0200)
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h

index 7c4c26a61777ee06bae713983012409e6dd693de..c45e12c046c1537a87463fce0f4cfb08fa7b5331 100644 (file)
@@ -680,7 +680,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
        u8 *ext_csd;
        int err;
 
-       if (!mmc_can_ext_csd(card))
+       if (!mmc_card_can_ext_csd(card))
                return 0;
 
        err = mmc_get_ext_csd(card, &ext_csd);
@@ -959,7 +959,7 @@ static int mmc_select_powerclass(struct mmc_card *card)
        int err, ddr;
 
        /* Power class selection is supported for versions >= 4.0 */
-       if (!mmc_can_ext_csd(card))
+       if (!mmc_card_can_ext_csd(card))
                return 0;
 
        bus_width = host->ios.bus_width;
@@ -1022,7 +1022,7 @@ static int mmc_select_bus_width(struct mmc_card *card)
        unsigned idx, bus_width = 0;
        int err = 0;
 
-       if (!mmc_can_ext_csd(card) ||
+       if (!mmc_card_can_ext_csd(card) ||
            !(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)))
                return 0;
 
@@ -1543,7 +1543,7 @@ static int mmc_select_timing(struct mmc_card *card)
 {
        int err = 0;
 
-       if (!mmc_can_ext_csd(card))
+       if (!mmc_card_can_ext_csd(card))
                goto bus_speed;
 
        if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES) {
index 5c8e62e8f3318c46705ef956b400a1a046f4043d..638e87a861bc6d9e343b7241d03390947baf4a12 100644 (file)
@@ -383,7 +383,7 @@ int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd)
        if (!card || !new_ext_csd)
                return -EINVAL;
 
-       if (!mmc_can_ext_csd(card))
+       if (!mmc_card_can_ext_csd(card))
                return -EOPNOTSUPP;
 
        /*
@@ -944,7 +944,7 @@ out:
        return err;
 }
 
-int mmc_can_ext_csd(struct mmc_card *card)
+bool mmc_card_can_ext_csd(struct mmc_card *card)
 {
        return (card && card->csd.mmca_vsn > CSD_SPEC_VER_3);
 }
index 0df3ebd900d1fa8726ef3b1141b6c0af7b61a21c..514c40ff4b4e383c7b588dfa61ee844b7187f2a0 100644 (file)
@@ -37,7 +37,7 @@ int mmc_send_cid(struct mmc_host *host, u32 *cid);
 int mmc_spi_read_ocr(struct mmc_host *host, int highcap, u32 *ocrp);
 int mmc_spi_set_crc(struct mmc_host *host, int use_crc);
 int mmc_bus_test(struct mmc_card *card, u8 bus_width);
-int mmc_can_ext_csd(struct mmc_card *card);
+bool mmc_card_can_ext_csd(struct mmc_card *card);
 int mmc_switch_status(struct mmc_card *card, bool crc_err_fatal);
 bool mmc_prepare_busy_cmd(struct mmc_host *host, struct mmc_command *cmd,
                          unsigned int timeout_ms);