[PATCH 4/7] mtd: Fix mtd_op_read for devices >4GiB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mtd read file operation has a unnecessary conversion to unsigned
long in the read offset. Remove it to make it work with chips >4GiB

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mtd/core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 586b4a0..3251bbc 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -67,14 +67,13 @@ int mtd_all_ff(const void *buf, unsigned int len)
 }
 
 static ssize_t mtd_op_read(struct cdev *cdev, void* buf, size_t count,
-			  loff_t _offset, ulong flags)
+			  loff_t offset, ulong flags)
 {
 	struct mtd_info *mtd = cdev->priv;
 	size_t retlen;
 	int ret;
-	unsigned long offset = _offset;
 
-	dev_dbg(cdev->dev, "read ofs: 0x%08lx count: 0x%08zx\n",
+	dev_dbg(cdev->dev, "read ofs: 0x%08llx count: 0x%08zx\n",
 			offset, count);
 
 	ret = mtd_read(mtd, offset, count, &retlen, buf);
-- 
2.7.0.rc3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux