From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] mmc: core: improve API to make clear that mmc_sw_reset is for cards
Date: Fri, 8 Apr 2022 10:00:43 +0200 [thread overview]
Message-ID: <20220408080045.6497-3-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20220408080045.6497-1-wsa+renesas@sang-engineering.com>
To make it unambiguous that mmc_sw_reset() is for cards and not for
controllers, we make the function argument mmc_card instead of mmc_host.
There are no users to convert currently.
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Change since RFC:
* don't rename the function but only change the argument type
drivers/mmc/core/core.c | 3 ++-
include/linux/mmc/core.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 6f2561469a8f..57c64c0583ac 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2020,8 +2020,9 @@ int mmc_hw_reset(struct mmc_card *card)
}
EXPORT_SYMBOL(mmc_hw_reset);
-int mmc_sw_reset(struct mmc_host *host)
+int mmc_sw_reset(struct mmc_card *card)
{
+ struct mmc_host *host = card->host;
int ret;
if (!host->bus_ops->sw_reset)
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index de5c64bbdb72..6efec0b9820c 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_hw_reset(struct mmc_card *card);
-int mmc_sw_reset(struct mmc_host *host);
+int mmc_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 */
--
2.30.2
next prev parent reply other threads:[~2022-04-08 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 8:00 [PATCH 0/3] mmc: improve API to make clear {h|s}w_reset is for cards Wolfram Sang
2022-04-08 8:00 ` [PATCH 1/3] mmc: core: improve API to make clear mmc_hw_reset " Wolfram Sang
2022-04-08 8:14 ` Kalle Valo
2022-04-08 8:00 ` Wolfram Sang [this message]
2022-04-08 8:00 ` [PATCH 3/3] mmc: improve API to make clear hw_reset callback " Wolfram Sang
2022-04-08 9:05 ` [PATCH 0/3] mmc: improve API to make clear {h|s}w_reset " Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220408080045.6497-3-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).