mmc: dw_mmc: Inline dw_mci_queue_request() into dw_mci_request()

With the removal of queue support, the function dw_mci_queue_request()
is now just a wrapper with a confusing name that doesn't suggest
anything about queue. Removes the function and moves its body into
dw_mci_request().

No functional changes intended.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
master
Shawn Lin 2026-03-31 15:54:49 +08:00 committed by Ulf Hansson
parent d34124edff
commit 0801cebde7
1 changed files with 19 additions and 27 deletions

View File

@ -1293,14 +1293,29 @@ static void dw_mci_start_request(struct dw_mci *host)
__dw_mci_start_request(host, cmd);
}
/* must be called with host->lock held */
static void dw_mci_queue_request(struct dw_mci *host, struct mmc_request *mrq)
static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
dev_vdbg(&host->mmc->class_dev, "queue request: state=%d\n",
struct dw_mci *host = mmc_priv(mmc);
WARN_ON(host->mrq);
/*
* The check for card presence and queueing of the request must be
* atomic, otherwise the card could be removed in between and the
* request wouldn't fail until another card was inserted.
*/
if (!dw_mci_get_cd(mmc)) {
mrq->cmd->error = -ENOMEDIUM;
mmc_request_done(mmc, mrq);
return;
}
spin_lock_bh(&host->lock);
dev_vdbg(&host->mmc->class_dev, "request: state=%d\n",
host->state);
host->mrq = mrq;
if (host->state == STATE_WAITING_CMD11_DONE) {
dev_warn(&host->mmc->class_dev,
"Voltage change didn't complete\n");
@ -1316,29 +1331,6 @@ static void dw_mci_queue_request(struct dw_mci *host, struct mmc_request *mrq)
host->state = STATE_SENDING_CMD;
dw_mci_start_request(host);
}
}
static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct dw_mci *host = mmc_priv(mmc);
WARN_ON(host->mrq);
/*
* The check for card presence and queueing of the request must be
* atomic, otherwise the card could be removed in between and the
* request wouldn't fail until another card was inserted.
*/
if (!dw_mci_get_cd(mmc)) {
mrq->cmd->error = -ENOMEDIUM;
mmc_request_done(mmc, mrq);
return;
}
spin_lock_bh(&host->lock);
dw_mci_queue_request(host, mrq);
spin_unlock_bh(&host->lock);
}