summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-11-26 22:05:25 +0300
committerMark Brown <broonie@kernel.org>2014-11-26 22:05:25 +0300
commit13616c71334a6024149a36d51db4bb000273da00 (patch)
treea57c50304673897015021465004b61ce36266497 /drivers
parent5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff)
parentc1aefbdd050e1fb15e92bcaf34d95b17ea952097 (diff)
downloadlinux-13616c71334a6024149a36d51db4bb000273da00.tar.xz
Merge remote-tracking branch 'spi/fix/dma' into spi-linus
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ebcb33df2eb2..50f20f243981 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -615,13 +615,13 @@ static int spi_map_buf(struct spi_master *master, struct device *dev,
sg_free_table(sgt);
return -ENOMEM;
}
- sg_buf = page_address(vm_page) +
- ((size_t)buf & ~PAGE_MASK);
+ sg_set_page(&sgt->sgl[i], vm_page,
+ min, offset_in_page(buf));
} else {
sg_buf = buf;
+ sg_set_buf(&sgt->sgl[i], sg_buf, min);
}
- sg_set_buf(&sgt->sgl[i], sg_buf, min);
buf += min;
len -= min;