mmc: dw_mmc: Remove dw_mci_start_request wrapper and rename core function

The function dw_mci_start_request() was just a thin wrapper around
__dw_mci_start_request(). Since it serves almost no functional purpose,
remove the wrapper to simplify the code flow.

Consequently, rename __dw_mci_start_request() to dw_mci_start_request()
so that the core implementation uses the primary name.

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:50 +08:00 committed by Ulf Hansson
parent 0801cebde7
commit e89e7d2fff
1 changed files with 5 additions and 13 deletions

View File

@ -1224,8 +1224,7 @@ static void dw_mci_set_data_timeout(struct dw_mci *host,
timeout_ns, tmout >> 8);
}
static void __dw_mci_start_request(struct dw_mci *host,
struct mmc_command *cmd)
static void dw_mci_start_request(struct dw_mci *host, struct mmc_command *cmd)
{
struct mmc_request *mrq;
struct mmc_data *data;
@ -1284,18 +1283,10 @@ static void __dw_mci_start_request(struct dw_mci *host,
host->stop_cmdr = dw_mci_prep_stop_abort(host, cmd);
}
static void dw_mci_start_request(struct dw_mci *host)
{
struct mmc_request *mrq = host->mrq;
struct mmc_command *cmd;
cmd = mrq->sbc ? mrq->sbc : mrq->cmd;
__dw_mci_start_request(host, cmd);
}
static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct dw_mci *host = mmc_priv(mmc);
struct mmc_command *cmd;
WARN_ON(host->mrq);
@ -1329,7 +1320,8 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
if (host->state == STATE_IDLE) {
host->state = STATE_SENDING_CMD;
dw_mci_start_request(host);
cmd = mrq->sbc ? mrq->sbc : mrq->cmd;
dw_mci_start_request(host, cmd);
}
spin_unlock_bh(&host->lock);
@ -1949,7 +1941,7 @@ static void dw_mci_work_func(struct work_struct *t)
set_bit(EVENT_CMD_COMPLETE, &host->completed_events);
err = dw_mci_command_complete(host, cmd);
if (cmd == mrq->sbc && !err) {
__dw_mci_start_request(host, mrq->cmd);
dw_mci_start_request(host, mrq->cmd);
goto unlock;
}