mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Cc: Maxim Levitsky <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: James Hogan <[email protected]> Cc: Stephen Warren <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a321e91b6d
commit
4225fc8555
3 changed files with 28 additions and 30 deletions
|
|
@ -1453,7 +1453,7 @@ static void dw_mci_read_data_pio(struct dw_mci *host)
|
|||
if (!sg_miter_next(sg_miter))
|
||||
goto done;
|
||||
|
||||
host->sg = sg_miter->__sg;
|
||||
host->sg = sg_miter->piter.sg;
|
||||
buf = sg_miter->addr;
|
||||
remain = sg_miter->length;
|
||||
offset = 0;
|
||||
|
|
@ -1508,7 +1508,7 @@ static void dw_mci_write_data_pio(struct dw_mci *host)
|
|||
if (!sg_miter_next(sg_miter))
|
||||
goto done;
|
||||
|
||||
host->sg = sg_miter->__sg;
|
||||
host->sg = sg_miter->piter.sg;
|
||||
buf = sg_miter->addr;
|
||||
remain = sg_miter->length;
|
||||
offset = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue