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

mmc: rename mmc_boot_partition_access() to mmc_host_can_access_boot()

It is not obvious that this functions checks capabilities. Rename it to
include '_can' like other capability helpers and reword it slightly.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-10-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Wolfram Sang and committed by
Ulf Hansson
9e654f2b f55f7da6

+2 -2
+1 -1
drivers/mmc/core/host.h
··· 49 49 return host->caps & MMC_CAP_DONE_COMPLETE; 50 50 } 51 51 52 - static inline int mmc_boot_partition_access(struct mmc_host *host) 52 + static inline int mmc_host_can_access_boot(struct mmc_host *host) 53 53 { 54 54 return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC); 55 55 }
+1 -1
drivers/mmc/core/mmc.c
··· 459 459 * There are two boot regions of equal size, defined in 460 460 * multiples of 128K. 461 461 */ 462 - if (ext_csd[EXT_CSD_BOOT_MULT] && mmc_boot_partition_access(card->host)) { 462 + if (ext_csd[EXT_CSD_BOOT_MULT] && mmc_host_can_access_boot(card->host)) { 463 463 for (idx = 0; idx < MMC_NUM_BOOT_PARTITION; idx++) { 464 464 part_size = ext_csd[EXT_CSD_BOOT_MULT] << 17; 465 465 mmc_part_add(card, part_size,