summaryrefslogtreecommitdiffstats
path: root/fs/devfs-core.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-02-08 14:23:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-02-09 09:32:29 +0100
commit81737c1d436add87e26a22dca9dd750b9655de01 (patch)
treefc85417cd52a3967c970a57ab95352d33baae6e8 /fs/devfs-core.c
parente0ae56c00864b0c1dc77b34d26c4e59096ad5403 (diff)
downloadbarebox-81737c1d436add87e26a22dca9dd750b9655de01.tar.gz
barebox-81737c1d436add87e26a22dca9dd750b9655de01.tar.xz
mtd: Fix erasing of devices >4GiB
When a device >4GiB is erased, not only the offset can be bigger than 4GiB, but also the size. This happens with the simplest command to erase a device: erase /dev/nand0. Make the size argument a 64bit type to make this work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/devfs-core.c')
-rw-r--r--fs/devfs-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 88a7e3a1d6..deacaaad3f 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -259,7 +259,7 @@ int cdev_ioctl(struct cdev *cdev, int request, void *buf)
return cdev->ops->ioctl(cdev, request, buf);
}
-int cdev_erase(struct cdev *cdev, size_t count, loff_t offset)
+int cdev_erase(struct cdev *cdev, loff_t count, loff_t offset)
{
if (!cdev->ops->erase)
return -ENOSYS;