diff options
| author | Shawn Lin <shawn.lin@rock-chips.com> | 2026-03-31 15:54:49 +0800 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2026-03-31 12:47:12 +0200 |
| commit | 0801cebde7b9a65c3ec081f4c7220bbfc1e351b9 (patch) | |
| tree | 2819432e18a68cf140dc67244280a3514e56fd44 /drivers | |
| parent | d34124edffdbd88ce21ed49c84d984b1c34e4670 (diff) | |
| download | linux-next-0801cebde7b9a65c3ec081f4c7220bbfc1e351b9.tar.gz linux-next-0801cebde7b9a65c3ec081f4c7220bbfc1e351b9.zip | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mmc/host/dw_mmc.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bbdd7594ef01..8e78faf6bb35 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1293,31 +1293,6 @@ 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) -{ - dev_vdbg(&host->mmc->class_dev, "queue 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"); - /* - * this case isn't expected to happen, so we can - * either crash here or just try to continue on - * in the closest possible state - */ - host->state = STATE_IDLE; - } - - if (host->state == STATE_IDLE) { - 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); @@ -1329,7 +1304,6 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq) * 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); @@ -1338,7 +1312,25 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq) spin_lock_bh(&host->lock); - dw_mci_queue_request(host, mrq); + 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"); + /* + * this case isn't expected to happen, so we can + * either crash here or just try to continue on + * in the closest possible state + */ + host->state = STATE_IDLE; + } + + if (host->state == STATE_IDLE) { + host->state = STATE_SENDING_CMD; + dw_mci_start_request(host); + } spin_unlock_bh(&host->lock); } |
