From 4646176e2e325e692423dfbee0f07f88210f36f1 Mon Sep 17 00:00:00 2001 From: Gary King Date: Mon, 8 Mar 2010 14:08:59 -0800 Subject: [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 Tested-by: Gary King --- drivers/char/nvmap.c | 4 ++-- 1 file 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); -- cgit v1.2.3