summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-28 22:55:40 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-04 15:30:11 +0100
commit0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e (patch)
treeab214800c21830022497a60925741850e9bcd1c8 /drivers/mtd/ubi
parent5c9408572406c8718a35931ecf74a5cf38632914 (diff)
downloadbarebox-0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e.tar.gz
barebox-0b80e3dae75c32e5f30bf4d9052d4f390cc0bb6e.tar.xz
fs: devfs: Change .lseek callbacks to return 'int'
Returning requested offset from .lseek() callback doesn't really give us any new information while bringing unnecessary complications. Change all .lseek() types (both in struct struct cdev_operations and in struct fs_driver_d) to return 'int' and adjust the rest of the codebase accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/barebox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/barebox.c b/drivers/mtd/ubi/barebox.c
index 65f5456455..781061d9a7 100644
--- a/drivers/mtd/ubi/barebox.c
+++ b/drivers/mtd/ubi/barebox.c
@@ -151,7 +151,7 @@ static int ubi_volume_cdev_close(struct cdev *cdev)
return 0;
}
-static loff_t ubi_volume_cdev_lseek(struct cdev *cdev, loff_t ofs)
+static int ubi_volume_cdev_lseek(struct cdev *cdev, loff_t ofs)
{
struct ubi_volume_cdev_priv *priv = cdev->priv;
@@ -159,7 +159,7 @@ static loff_t ubi_volume_cdev_lseek(struct cdev *cdev, loff_t ofs)
if (priv->written)
return -EINVAL;
- return ofs;
+ return 0;
}
static int ubi_volume_cdev_truncate(struct cdev *cdev, size_t size)