aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2013-02-27 20:02:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-27 22:10:10 -0500
commit4225fc8555a992c7f91d174ef424384d6781e144 (patch)
tree46f73428afef93acc729fd36842e463b503bab58 /drivers/mmc
parenta321e91b6d73ed011ffceed384c40d2785cf723b (diff)
lib/scatterlist: use page iterator in the mapping iterator
For better code reuse use the newly added page iterator to iterate through the pages. The offset, length within the page is still calculated by the mapping iterator as well as the actual mapping. Idea from Tejun Heo. Signed-off-by: Imre Deak <imre.deak@intel.com> Cc: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: James Hogan <james.hogan@imgtec.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 60063ccb4c4b..98342213ed21 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1453,7 +1453,7 @@ static void dw_mci_read_data_pio(struct dw_mci *host)
1453 if (!sg_miter_next(sg_miter)) 1453 if (!sg_miter_next(sg_miter))
1454 goto done; 1454 goto done;
1455 1455
1456 host->sg = sg_miter->__sg; 1456 host->sg = sg_miter->piter.sg;
1457 buf = sg_miter->addr; 1457 buf = sg_miter->addr;
1458 remain = sg_miter->length; 1458 remain = sg_miter->length;
1459 offset = 0; 1459 offset = 0;
@@ -1508,7 +1508,7 @@ static void dw_mci_write_data_pio(struct dw_mci *host)
1508 if (!sg_miter_next(sg_miter)) 1508 if (!sg_miter_next(sg_miter))
1509 goto done; 1509 goto done;
1510 1510
1511 host->sg = sg_miter->__sg; 1511 host->sg = sg_miter->piter.sg;
1512 buf = sg_miter->addr; 1512 buf = sg_miter->addr;
1513 remain = sg_miter->length; 1513 remain = sg_miter->length;
1514 offset = 0; 1514 offset = 0;