summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2017-03-13 14:36:40 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:42:04 +0200
commit9cb38f7a2d0aab5730ac18117ab2f5c9e3d4a826 (patch)
tree96d04e01025aa076e5f510d40d7f2f89b70bf311 /drivers/mmc
parent025e3d5fe157e8a12ed4ab59d0e147046c87cbd9 (diff)
downloadlinux-9cb38f7a2d0aab5730ac18117ab2f5c9e3d4a826.tar.bz2
mmc: block: Change mmc_apply_rel_rw() to get block address from the request
mmc_apply_rel_rw() will be used by Software Command Queuing also. In that case the command argument is not the block address so change mmc_apply_rel_rw() to get block address from the request. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index d189e8c4436e..6d2c302c3673 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1309,7 +1309,7 @@ static inline void mmc_apply_rel_rw(struct mmc_blk_request *brq,
{
if (!(card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN)) {
/* Legacy mode imposes restrictions on transfers. */
- if (!IS_ALIGNED(brq->cmd.arg, card->ext_csd.rel_sectors))
+ if (!IS_ALIGNED(blk_rq_pos(req), card->ext_csd.rel_sectors))
brq->data.blocks = 1;
if (brq->data.blocks > card->ext_csd.rel_sectors)