mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mmc: delete is_first_req parameter from pre-request callback
The void (*pre_req) callback in the struct mmc_host_ops vtable is passing an argument "is_first_req" indicating whether this is the first request or not. None of the in-kernel users use this parameter: instead, since they all just do variants of dma_map* they use the DMA cookie to indicate whether a pre* callback has already been done for a request when they decide how to handle it. Delete the parameter from the callback and all users, as it is just pointless cruft. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
e173f8911f
commit
d3c6aac3bd
|
|
@ -611,18 +611,15 @@ EXPORT_SYMBOL(mmc_is_req_done);
|
||||||
* mmc_pre_req - Prepare for a new request
|
* mmc_pre_req - Prepare for a new request
|
||||||
* @host: MMC host to prepare command
|
* @host: MMC host to prepare command
|
||||||
* @mrq: MMC request to prepare for
|
* @mrq: MMC request to prepare for
|
||||||
* @is_first_req: true if there is no previous started request
|
|
||||||
* that may run in parellel to this call, otherwise false
|
|
||||||
*
|
*
|
||||||
* mmc_pre_req() is called in prior to mmc_start_req() to let
|
* mmc_pre_req() is called in prior to mmc_start_req() to let
|
||||||
* host prepare for the new request. Preparation of a request may be
|
* host prepare for the new request. Preparation of a request may be
|
||||||
* performed while another request is running on the host.
|
* performed while another request is running on the host.
|
||||||
*/
|
*/
|
||||||
static void mmc_pre_req(struct mmc_host *host, struct mmc_request *mrq,
|
static void mmc_pre_req(struct mmc_host *host, struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
if (host->ops->pre_req)
|
if (host->ops->pre_req)
|
||||||
host->ops->pre_req(host, mrq, is_first_req);
|
host->ops->pre_req(host, mrq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -667,7 +664,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
|
||||||
|
|
||||||
/* Prepare a new request */
|
/* Prepare a new request */
|
||||||
if (areq)
|
if (areq)
|
||||||
mmc_pre_req(host, areq->mrq, !host->areq);
|
mmc_pre_req(host, areq->mrq);
|
||||||
|
|
||||||
if (host->areq) {
|
if (host->areq) {
|
||||||
status = mmc_wait_for_data_req_done(host, host->areq->mrq, areq);
|
status = mmc_wait_for_data_req_done(host, host->areq->mrq, areq);
|
||||||
|
|
@ -696,7 +693,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
|
||||||
|
|
||||||
/* prepare the request again */
|
/* prepare the request again */
|
||||||
if (areq)
|
if (areq)
|
||||||
mmc_pre_req(host, areq->mrq, !host->areq);
|
mmc_pre_req(host, areq->mrq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -886,8 +886,7 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dw_mci_pre_req(struct mmc_host *mmc,
|
static void dw_mci_pre_req(struct mmc_host *mmc,
|
||||||
struct mmc_request *mrq,
|
struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct dw_mci_slot *slot = mmc_priv(mmc);
|
struct dw_mci_slot *slot = mmc_priv(mmc);
|
||||||
struct mmc_data *data = mrq->data;
|
struct mmc_data *data = mrq->data;
|
||||||
|
|
|
||||||
|
|
@ -320,8 +320,7 @@ static int jz4740_mmc_start_dma_transfer(struct jz4740_mmc_host *host,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void jz4740_mmc_pre_request(struct mmc_host *mmc,
|
static void jz4740_mmc_pre_request(struct mmc_host *mmc,
|
||||||
struct mmc_request *mrq,
|
struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct jz4740_mmc_host *host = mmc_priv(mmc);
|
struct jz4740_mmc_host *host = mmc_priv(mmc);
|
||||||
struct mmc_data *data = mrq->data;
|
struct mmc_data *data = mrq->data;
|
||||||
|
|
|
||||||
|
|
@ -699,8 +699,7 @@ static void mmci_get_next_data(struct mmci_host *host, struct mmc_data *data)
|
||||||
next->dma_chan = NULL;
|
next->dma_chan = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mmci_pre_request(struct mmc_host *mmc, struct mmc_request *mrq,
|
static void mmci_pre_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct mmci_host *host = mmc_priv(mmc);
|
struct mmci_host *host = mmc_priv(mmc);
|
||||||
struct mmc_data *data = mrq->data;
|
struct mmc_data *data = mrq->data;
|
||||||
|
|
|
||||||
|
|
@ -927,8 +927,7 @@ static void msdc_ops_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||||
msdc_start_command(host, mrq, mrq->cmd);
|
msdc_start_command(host, mrq, mrq->cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void msdc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
static void msdc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct msdc_host *host = mmc_priv(mmc);
|
struct msdc_host *host = mmc_priv(mmc);
|
||||||
struct mmc_data *data = mrq->data;
|
struct mmc_data *data = mrq->data;
|
||||||
|
|
|
||||||
|
|
@ -1565,8 +1565,7 @@ static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct omap_hsmmc_host *host = mmc_priv(mmc);
|
struct omap_hsmmc_host *host = mmc_priv(mmc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,7 @@ static int sd_pre_dma_transfer(struct realtek_pci_sdmmc *host,
|
||||||
return using_cookie;
|
return using_cookie;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sdmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
static void sdmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct realtek_pci_sdmmc *host = mmc_priv(mmc);
|
struct realtek_pci_sdmmc *host = mmc_priv(mmc);
|
||||||
struct mmc_data *data = mrq->data;
|
struct mmc_data *data = mrq->data;
|
||||||
|
|
|
||||||
|
|
@ -2202,8 +2202,7 @@ static void sdhci_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
||||||
data->host_cookie = COOKIE_UNMAPPED;
|
data->host_cookie = COOKIE_UNMAPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sdhci_pre_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
static void sdhci_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||||
bool is_first_req)
|
|
||||||
{
|
{
|
||||||
struct sdhci_host *host = mmc_priv(mmc);
|
struct sdhci_host *host = mmc_priv(mmc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,7 @@ struct mmc_host_ops {
|
||||||
*/
|
*/
|
||||||
void (*post_req)(struct mmc_host *host, struct mmc_request *req,
|
void (*post_req)(struct mmc_host *host, struct mmc_request *req,
|
||||||
int err);
|
int err);
|
||||||
void (*pre_req)(struct mmc_host *host, struct mmc_request *req,
|
void (*pre_req)(struct mmc_host *host, struct mmc_request *req);
|
||||||
bool is_first_req);
|
|
||||||
void (*request)(struct mmc_host *host, struct mmc_request *req);
|
void (*request)(struct mmc_host *host, struct mmc_request *req);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user