提交 c3399ef5 编写于 作者: L Linus Walleij 提交者: Ulf Hansson

mmc: core: rename mmc_start_req() to *areq()

With the coexisting __mmc_start_request(), mmc_start_request()
and __mmc_start_req() it is a bit confusing that mmc_start_req()
actually does not start a normal request, but an asynchronous
request.

Rename it to mmc_start_areq() to make it explicit what the
function is doing, also fix the kerneldoc for this function
while we're at it.
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 acd8dbd6
...@@ -1609,8 +1609,8 @@ static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card, ...@@ -1609,8 +1609,8 @@ static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card,
blk_end_request_all(req, -EIO); blk_end_request_all(req, -EIO);
} else { } else {
mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
mmc_start_req(card->host, mmc_start_areq(card->host,
&mq->mqrq_cur->mmc_active, NULL); &mq->mqrq_cur->mmc_active, NULL);
} }
} }
...@@ -1648,7 +1648,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req) ...@@ -1648,7 +1648,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req)
} else } else
new_areq = NULL; new_areq = NULL;
old_areq = mmc_start_req(card->host, new_areq, &status); old_areq = mmc_start_areq(card->host, new_areq, &status);
if (!old_areq) { if (!old_areq) {
/* /*
* We have just put the first request into the pipeline * We have just put the first request into the pipeline
...@@ -1769,7 +1769,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req) ...@@ -1769,7 +1769,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req)
*/ */
mmc_blk_rw_rq_prep(mq_rq, card, mmc_blk_rw_rq_prep(mq_rq, card,
disable_multi, mq); disable_multi, mq);
mmc_start_req(card->host, mmc_start_areq(card->host,
&mq_rq->mmc_active, NULL); &mq_rq->mmc_active, NULL);
mq_rq->brq.retune_retry_done = retune_retry_done; mq_rq->brq.retune_retry_done = retune_retry_done;
} }
......
...@@ -631,10 +631,10 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, ...@@ -631,10 +631,10 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq,
} }
/** /**
* mmc_start_req - start a non-blocking request * mmc_start_areq - start an asynchronous request
* @host: MMC host to start command * @host: MMC host to start command
* @areq: async request to start * @areq: asynchronous request to start
* @error: out parameter returns 0 for success, otherwise non zero * @ret_stat: out parameter for status
* *
* Start a new MMC custom command request for a host. * Start a new MMC custom command request for a host.
* If there is on ongoing async request wait for completion * If there is on ongoing async request wait for completion
...@@ -646,9 +646,9 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, ...@@ -646,9 +646,9 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq,
* return the completed request. If there is no ongoing request, NULL * return the completed request. If there is no ongoing request, NULL
* is returned without waiting. NULL is not an error condition. * is returned without waiting. NULL is not an error condition.
*/ */
struct mmc_async_req *mmc_start_req(struct mmc_host *host, struct mmc_async_req *mmc_start_areq(struct mmc_host *host,
struct mmc_async_req *areq, struct mmc_async_req *areq,
enum mmc_blk_status *ret_stat) enum mmc_blk_status *ret_stat)
{ {
enum mmc_blk_status status = MMC_BLK_SUCCESS; enum mmc_blk_status status = MMC_BLK_SUCCESS;
int start_err = 0; int start_err = 0;
...@@ -699,7 +699,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, ...@@ -699,7 +699,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
*ret_stat = status; *ret_stat = status;
return data; return data;
} }
EXPORT_SYMBOL(mmc_start_req); EXPORT_SYMBOL(mmc_start_areq);
/** /**
* mmc_wait_for_req - start a request and wait for completion * mmc_wait_for_req - start a request and wait for completion
......
...@@ -853,7 +853,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test, ...@@ -853,7 +853,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test,
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
mmc_test_prepare_mrq(test, cur_areq->mrq, sg, sg_len, dev_addr, mmc_test_prepare_mrq(test, cur_areq->mrq, sg, sg_len, dev_addr,
blocks, blksz, write); blocks, blksz, write);
done_areq = mmc_start_req(test->card->host, cur_areq, &status); done_areq = mmc_start_areq(test->card->host, cur_areq, &status);
if (status != MMC_BLK_SUCCESS || (!done_areq && i > 0)) { if (status != MMC_BLK_SUCCESS || (!done_areq && i > 0)) {
ret = RESULT_FAIL; ret = RESULT_FAIL;
...@@ -872,7 +872,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test, ...@@ -872,7 +872,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test,
dev_addr += blocks; dev_addr += blocks;
} }
done_areq = mmc_start_req(test->card->host, NULL, &status); done_areq = mmc_start_areq(test->card->host, NULL, &status);
if (status != MMC_BLK_SUCCESS) if (status != MMC_BLK_SUCCESS)
ret = RESULT_FAIL; ret = RESULT_FAIL;
...@@ -2402,7 +2402,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test, ...@@ -2402,7 +2402,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test,
/* Start ongoing data request */ /* Start ongoing data request */
if (use_areq) { if (use_areq) {
mmc_start_req(host, &test_areq.areq, &blkstat); mmc_start_areq(host, &test_areq.areq, &blkstat);
if (blkstat != MMC_BLK_SUCCESS) { if (blkstat != MMC_BLK_SUCCESS) {
ret = RESULT_FAIL; ret = RESULT_FAIL;
goto out_free; goto out_free;
...@@ -2440,7 +2440,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test, ...@@ -2440,7 +2440,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test,
/* Wait for data request to complete */ /* Wait for data request to complete */
if (use_areq) { if (use_areq) {
mmc_start_req(host, NULL, &blkstat); mmc_start_areq(host, NULL, &blkstat);
if (blkstat != MMC_BLK_SUCCESS) if (blkstat != MMC_BLK_SUCCESS)
ret = RESULT_FAIL; ret = RESULT_FAIL;
} else { } else {
......
...@@ -158,7 +158,7 @@ struct mmc_request { ...@@ -158,7 +158,7 @@ struct mmc_request {
struct mmc_card; struct mmc_card;
struct mmc_async_req; struct mmc_async_req;
struct mmc_async_req *mmc_start_req(struct mmc_host *host, struct mmc_async_req *mmc_start_areq(struct mmc_host *host,
struct mmc_async_req *areq, struct mmc_async_req *areq,
enum mmc_blk_status *ret_stat); enum mmc_blk_status *ret_stat);
void mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq); void mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册