[PATCH 05/19] mem_read/write: use resources

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Jul 19 06:14:29 EDT 2011


On 10:39 Tue 19 Jul     , Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
>  fs/fs.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/fs.c b/fs/fs.c
> index e71d5a2..bcc6ff4 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -1048,8 +1048,7 @@ ssize_t mem_read(struct cdev *cdev, void *buf, size_t count, ulong offset, ulong
>  	dev = cdev->dev;
>  
>  	size = min((ulong)count, dev->size - offset);
> -	debug("mem_read: dev->map_base: %p size: %d offset: %d\n",dev->map_base, size, offset);
in two patch?
> -	memcpy_sz(buf, (void *)(dev->map_base + offset), size, flags & O_RWSIZE_MASK);
> +	memcpy_sz(buf, dev_get_mem_region(dev, 0) + offset, size, flags & O_RWSIZE_MASK);
>  	return size;
>  }
Best Regards,
J.



More information about the barebox mailing list