]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: core: Remove checking MMC_CAP_4_BIT_DATA from mmc_host_can_uhs()
authorShawn Lin <shawn.lin@linux.dev>
Tue, 10 Mar 2026 01:35:53 +0000 (09:35 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Mar 2026 14:46:58 +0000 (15:46 +0100)
The bus width support for UHS mode is now validated in mmc_validate_host_caps().
Therefore, we can safely remove the explicit MMC_CAP_4_BIT_DATA check from
mmc_host_can_uhs(). As part of this cleanup, simplify the condition by using
the consolidated MMC_CAP_UHS flag.

Signed-off-by: Shawn Lin <shawn.lin@linux.dev>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.h

index 5941d68ff98949a25a15e262187a45312608569b..6bce5a4798e2fdcd098b4133d5819cfc64885e48 100644 (file)
@@ -56,11 +56,7 @@ static inline int mmc_host_can_access_boot(struct mmc_host *host)
 
 static inline int mmc_host_can_uhs(struct mmc_host *host)
 {
-       return host->caps &
-               (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
-                MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 |
-                MMC_CAP_UHS_DDR50) &&
-              host->caps & MMC_CAP_4_BIT_DATA;
+       return host->caps & MMC_CAP_UHS;
 }
 
 static inline bool mmc_card_hs200(struct mmc_card *card)