Commit 13616c71 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'spi/fix/dma' into spi-linus

parents 5d01410f c1aefbdd
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment