Skip to content

Commit

Permalink
mmc: sdhci: Move timer and has_requests functions
Browse files Browse the repository at this point in the history
In preparation for removing finish_tasklet, move some functions.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Adrian Hunter authored and Ulf Hansson committed Apr 15, 2019
1 parent 2e72ab9 commit 97a1aba
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,28 @@ static inline void sdhci_led_deactivate(struct sdhci_host *host)

#endif

static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_request *mrq,
unsigned long timeout)
{
if (sdhci_data_line_cmd(mrq->cmd))
mod_timer(&host->data_timer, timeout);
else
mod_timer(&host->timer, timeout);
}

static void sdhci_del_timer(struct sdhci_host *host, struct mmc_request *mrq)
{
if (sdhci_data_line_cmd(mrq->cmd))
del_timer(&host->data_timer);
else
del_timer(&host->timer);
}

static inline bool sdhci_has_requests(struct sdhci_host *host)
{
return host->cmd || host->data_cmd;
}

/*****************************************************************************\
* *
* Core functions *
Expand Down Expand Up @@ -1316,23 +1338,6 @@ static void sdhci_finish_data(struct sdhci_host *host)
}
}

static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_request *mrq,
unsigned long timeout)
{
if (sdhci_data_line_cmd(mrq->cmd))
mod_timer(&host->data_timer, timeout);
else
mod_timer(&host->timer, timeout);
}

static void sdhci_del_timer(struct sdhci_host *host, struct mmc_request *mrq)
{
if (sdhci_data_line_cmd(mrq->cmd))
del_timer(&host->data_timer);
else
del_timer(&host->timer);
}

void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
{
int flags;
Expand Down Expand Up @@ -2528,11 +2533,6 @@ static void sdhci_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
sdhci_pre_dma_transfer(host, mrq->data, COOKIE_PRE_MAPPED);
}

static inline bool sdhci_has_requests(struct sdhci_host *host)
{
return host->cmd || host->data_cmd;
}

static void sdhci_error_out_mrqs(struct sdhci_host *host, int err)
{
if (host->data_cmd) {
Expand Down

0 comments on commit 97a1aba

Please sign in to comment.