diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-09-20 12:34:38 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-09-26 22:31:31 +0300 |
commit | 29eb7bd01e80df316ab9d1da1a4ee580fae89188 (patch) | |
tree | e665ba24917d0e009babbd5fe03fa25066f79513 /drivers/mmc/card/queue.c | |
parent | c80f275fa1766cfdbc24c7a5d3d870df1fe730db (diff) | |
download | linux-29eb7bd01e80df316ab9d1da1a4ee580fae89188.tar.xz |
mmc: card: do away with indirection pointer
We have enough vtables in the kernel as it is, we don't need
this one to create even more artificial separation of concerns.
As is proved by the Makefile:
obj-$(CONFIG_MMC_BLOCK) += mmc_block.o
mmc_block-objs := block.o queue.o
block.c and queue.c are baked into the same mmc_block.o object.
So why would one of these objects access a function in the
other object by dereferencing a pointer?
Create a new block.h header file for the single shared function
from block to queue and remove the function pointer and just
call the queue request function.
Apart from making the code more readable, this also makes link
optimizations possible and probably speeds up the call as well.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r-- | drivers/mmc/card/queue.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 708057261b38..8037f73a109a 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -19,7 +19,9 @@ #include <linux/mmc/card.h> #include <linux/mmc/host.h> + #include "queue.h" +#include "block.h" #define MMC_QUEUE_BOUNCESZ 65536 @@ -68,7 +70,7 @@ static int mmc_queue_thread(void *d) bool req_is_special = mmc_req_is_special(req); set_current_state(TASK_RUNNING); - mq->issue_fn(mq, req); + mmc_blk_issue_rq(mq, req); cond_resched(); if (mq->flags & MMC_QUEUE_NEW_REQUEST) { mq->flags &= ~MMC_QUEUE_NEW_REQUEST; |