summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-03-08 14:08:59 -0800
committerGary King <gking@nvidia.com>2010-03-08 14:13:22 -0800
commit4646176e2e325e692423dfbee0f07f88210f36f1 (patch)
tree99543280151a3b1c74d1db07379e680a24f26ef3
parent0c2c9956982663d23373ac7ac7c3bfea57f5d2ae (diff)
[nvmap] fix strided read/write loop increment
in the process of cleaning up the implementation of do_rw so that it could be called from both ioctl and kernel contexts, the loop increment for source and distination addresses was erroneously set to the element size, rather than the provided strides. bug 660448 Change-Id: I02e2b2b980f90a2171d811192b667883f2a3ab41 Reviewed-on: http://git-master/r/805 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
-rw-r--r--drivers/char/nvmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/nvmap.c b/drivers/char/nvmap.c
index 2391d1803dd1..6816d478cfd0 100644
--- a/drivers/char/nvmap.c
+++ b/drivers/char/nvmap.c
@@ -2434,8 +2434,8 @@ static ssize_t _nvmap_do_rw_handle(struct nvmap_handle *h, int is_read,
}
bytes_copied += ret;
if (ret < elem_size) break;
- sys_addr += elem_size;
- h_offs += elem_size;
+ sys_addr += sys_stride;
+ h_offs += h_stride;
}
if (addr) nvmap_unmap_pte(addr);