aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorWolfram Sang <[email protected]>2025-04-01 09:58:37 +0000
committerUlf Hansson <[email protected]>2025-05-14 14:59:17 +0000
commit76d62cde684ba53dcbc6923b2ec90a024ee253f9 (patch)
treeb1aeaae0758febec37458f57c415f21cd8ec62ac /drivers/mmc/core/core.c
parentmmc: alcor: Use str_read_write() helper (diff)
downloadkernel-76d62cde684ba53dcbc6923b2ec90a024ee253f9.tar.gz
kernel-76d62cde684ba53dcbc6923b2ec90a024ee253f9.zip
mmc: rename mmc_can_discard() to mmc_card_can_discard()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index ce08e0ea7fc1..8bc46ea370e8 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1854,17 +1854,15 @@ int mmc_can_trim(struct mmc_card *card)
}
EXPORT_SYMBOL(mmc_can_trim);
-int mmc_can_discard(struct mmc_card *card)
+bool mmc_card_can_discard(struct mmc_card *card)
{
/*
* As there's no way to detect the discard support bit at v4.5
* use the s/w feature support filed.
*/
- if (card->ext_csd.feature_support & MMC_DISCARD_FEATURE)
- return 1;
- return 0;
+ return (card->ext_csd.feature_support & MMC_DISCARD_FEATURE);
}
-EXPORT_SYMBOL(mmc_can_discard);
+EXPORT_SYMBOL(mmc_card_can_discard);
int mmc_can_sanitize(struct mmc_card *card)
{