From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 2.mo4.mail-out.ovh.net ([46.105.72.36] helo=mo4.mail-out.ovh.net) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QjD7X-0003tt-31 for barebox@lists.infradead.org; Tue, 19 Jul 2011 16:26:14 +0000 Received: from mail187.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo4.mail-out.ovh.net (Postfix) with SMTP id 795ACFFA7A9 for ; Tue, 19 Jul 2011 18:26:35 +0200 (CEST) From: Jean-Christophe PLAGNIOL-VILLARD Date: Tue, 19 Jul 2011 18:09:01 +0200 Message-Id: <1311091752-9114-5-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <20110719160758.GK5727@game.jcrosoft.org> References: <20110719160758.GK5727@game.jcrosoft.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 05/16] mem_read/write: use resources To: barebox@lists.infradead.org From: Sascha Hauer Signed-off-by: Sascha Hauer --- 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); - 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; } EXPORT_SYMBOL(mem_read); @@ -1064,7 +1063,7 @@ ssize_t mem_write(struct cdev *cdev, const void *buf, size_t count, ulong offset dev = cdev->dev; size = min((ulong)count, dev->size - offset); - memcpy_sz((void *)(dev->map_base + offset), buf, size, flags & O_RWSIZE_MASK); + memcpy_sz(dev_get_mem_region(dev, 0) + offset, buf, size, flags & O_RWSIZE_MASK); return size; } EXPORT_SYMBOL(mem_write); -- 1.7.5.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox