Skip to content

Commit ceb5d3a

Browse files
Wolfram SangUlf Hansson
authored andcommitted
mmc: rename mmc_can_ext_csd() to mmc_card_can_ext_csd()
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>
1 parent 5513d9b commit ceb5d3a

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

drivers/mmc/core/mmc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
680680
u8 *ext_csd;
681681
int err;
682682

683-
if (!mmc_can_ext_csd(card))
683+
if (!mmc_card_can_ext_csd(card))
684684
return 0;
685685

686686
err = mmc_get_ext_csd(card, &ext_csd);
@@ -959,7 +959,7 @@ static int mmc_select_powerclass(struct mmc_card *card)
959959
int err, ddr;
960960

961961
/* Power class selection is supported for versions >= 4.0 */
962-
if (!mmc_can_ext_csd(card))
962+
if (!mmc_card_can_ext_csd(card))
963963
return 0;
964964

965965
bus_width = host->ios.bus_width;
@@ -1022,7 +1022,7 @@ static int mmc_select_bus_width(struct mmc_card *card)
10221022
unsigned idx, bus_width = 0;
10231023
int err = 0;
10241024

1025-
if (!mmc_can_ext_csd(card) ||
1025+
if (!mmc_card_can_ext_csd(card) ||
10261026
!(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)))
10271027
return 0;
10281028

@@ -1543,7 +1543,7 @@ static int mmc_select_timing(struct mmc_card *card)
15431543
{
15441544
int err = 0;
15451545

1546-
if (!mmc_can_ext_csd(card))
1546+
if (!mmc_card_can_ext_csd(card))
15471547
goto bus_speed;
15481548

15491549
if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES) {

drivers/mmc/core/mmc_ops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd)
383383
if (!card || !new_ext_csd)
384384
return -EINVAL;
385385

386-
if (!mmc_can_ext_csd(card))
386+
if (!mmc_card_can_ext_csd(card))
387387
return -EOPNOTSUPP;
388388

389389
/*
@@ -944,7 +944,7 @@ static int mmc_interrupt_hpi(struct mmc_card *card)
944944
return err;
945945
}
946946

947-
int mmc_can_ext_csd(struct mmc_card *card)
947+
bool mmc_card_can_ext_csd(struct mmc_card *card)
948948
{
949949
return (card && card->csd.mmca_vsn > CSD_SPEC_VER_3);
950950
}

drivers/mmc/core/mmc_ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int mmc_send_cid(struct mmc_host *host, u32 *cid);
3737
int mmc_spi_read_ocr(struct mmc_host *host, int highcap, u32 *ocrp);
3838
int mmc_spi_set_crc(struct mmc_host *host, int use_crc);
3939
int mmc_bus_test(struct mmc_card *card, u8 bus_width);
40-
int mmc_can_ext_csd(struct mmc_card *card);
40+
bool mmc_card_can_ext_csd(struct mmc_card *card);
4141
int mmc_switch_status(struct mmc_card *card, bool crc_err_fatal);
4242
bool mmc_prepare_busy_cmd(struct mmc_host *host, struct mmc_command *cmd,
4343
unsigned int timeout_ms);

0 commit comments

Comments
 (0)