diff mbox series

[RFC,07/10] mmc: core: improve API to make clear that mmc_sw_reset is for cards

Message ID 20220321115059.21803-8-wsa+renesas@sang-engineering.com
State New
Headers show
Series mmc: improve API to make clear {h|s}w_reset is for cards | expand

Commit Message

Wolfram Sang March 21, 2022, 11:50 a.m. UTC
To make it unambiguous that mmc_sw_reset() is for cards and not for
controllers, we a) add 'card' to the function name and b) make the
function argument mmc_card instead of mmc_host. There is no fallback
because there are currently no users.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/core/core.c  | 5 +++--
 include/linux/mmc/core.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 7a2985dde0e6..3498b341acaf 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2018,8 +2018,9 @@  int mmc_card_hw_reset(struct mmc_card *card)
 }
 EXPORT_SYMBOL(mmc_card_hw_reset);
 
-int mmc_sw_reset(struct mmc_host *host)
+int mmc_card_sw_reset(struct mmc_card *card)
 {
+	struct mmc_host *host = card->host;
 	int ret;
 
 	if (!host->bus_ops->sw_reset)
@@ -2032,7 +2033,7 @@  int mmc_sw_reset(struct mmc_host *host)
 
 	return ret;
 }
-EXPORT_SYMBOL(mmc_sw_reset);
+EXPORT_SYMBOL(mmc_card_sw_reset);
 
 static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
 {
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 7759502c8c67..c2616b61c191 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -176,7 +176,7 @@  int mmc_wait_for_cmd(struct mmc_host *host, struct mmc_command *cmd,
 		int retries);
 
 int mmc_card_hw_reset(struct mmc_card *card);
-int mmc_sw_reset(struct mmc_host *host);
+int mmc_card_sw_reset(struct mmc_card *card);
 void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card);
 
 #endif /* LINUX_MMC_CORE_H */