@@ -2023,10 +2023,10 @@ int mmc_card_sw_reset(struct mmc_card *card)
struct mmc_host *host = card->host;
int ret;
- if (!host->bus_ops->sw_reset)
+ if (!host->bus_ops->card_sw_reset)
return -EOPNOTSUPP;
- ret = host->bus_ops->sw_reset(host);
+ ret = host->bus_ops->card_sw_reset(card);
if (ret)
pr_warn("%s: tried to SW reset card, got error %d\n",
mmc_hostname(host), ret);
@@ -28,7 +28,7 @@ struct mmc_bus_ops {
int (*alive)(struct mmc_host *);
int (*shutdown)(struct mmc_host *);
int (*card_hw_reset)(struct mmc_card *);
- int (*sw_reset)(struct mmc_host *);
+ int (*card_sw_reset)(struct mmc_card *);
bool (*cache_enabled)(struct mmc_host *);
int (*flush_cache)(struct mmc_host *);
};
@@ -1154,8 +1154,10 @@ static int mmc_sdio_card_hw_reset(struct mmc_card *card)
return mmc_sdio_reinit_card(host);
}
-static int mmc_sdio_sw_reset(struct mmc_host *host)
+static int mmc_sdio_card_sw_reset(struct mmc_card *card)
{
+ struct mmc_host *host = card->host;
+
mmc_set_clock(host, host->f_init);
sdio_reset(host);
mmc_go_idle(host);
@@ -1176,7 +1178,7 @@ static const struct mmc_bus_ops mmc_sdio_ops = {
.runtime_resume = mmc_sdio_runtime_resume,
.alive = mmc_sdio_alive,
.card_hw_reset = mmc_sdio_card_hw_reset,
- .sw_reset = mmc_sdio_sw_reset,
+ .card_sw_reset = mmc_sdio_card_sw_reset,
};
To make it unambiguous that bus_ops->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. All users are converted, too. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- drivers/mmc/core/core.c | 4 ++-- drivers/mmc/core/core.h | 2 +- drivers/mmc/core/sdio.c | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-)