summaryrefslogtreecommitdiffstats
path: root/fs/omap4_usbbootfs.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-28 22:55:38 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-29 09:27:03 +0100
commit0c2431b5a15ca03e20ce3c698b8b708181db5fd9 (patch)
tree56bc9715b4aff02e2a8a775e0604965c014d236f /fs/omap4_usbbootfs.c
parentc44997e621cfe190fe44523e6cbcb03fea21eb8c (diff)
downloadbarebox-0c2431b5a15ca03e20ce3c698b8b708181db5fd9.tar.gz
barebox-0c2431b5a15ca03e20ce3c698b8b708181db5fd9.tar.xz
fs: Drop trivial .lseek() implementaitons in FS drivers
There are no FS drivers that do not implement .lseek callback in the codebase, so there doesn't seem to exist a use-case where lseek() would return -ENOSYS due to fsdrv->lseek being NULL. At the same time a large number of FS drivers implement only the most basic "always succeeds" custom .lseek() hook. Change the code of lseek() to treat absense of .lseek() to mean that no special actions needs to be taken by FS driver and seek is always successful and drop all of the trivial .lseek() implementations. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/omap4_usbbootfs.c')
-rw-r--r--fs/omap4_usbbootfs.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/omap4_usbbootfs.c b/fs/omap4_usbbootfs.c
index 51038c705d..cc33287b95 100644
--- a/fs/omap4_usbbootfs.c
+++ b/fs/omap4_usbbootfs.c
@@ -149,11 +149,6 @@ static int omap4_usbbootfs_read(
return size;
}
-static loff_t omap4_usbbootfs_lseek(struct device_d *dev, FILE *f, loff_t pos)
-{
- return pos;
-}
-
static DIR *omap4_usbbootfs_opendir(struct device_d *dev, const char *pathname)
{
return NULL;
@@ -190,7 +185,6 @@ static struct fs_driver_d omap4_usbbootfs_driver = {
.open = omap4_usbbootfs_open,
.close = omap4_usbbootfs_close,
.read = omap4_usbbootfs_read,
- .lseek = omap4_usbbootfs_lseek,
.opendir = omap4_usbbootfs_opendir,
.stat = omap4_usbbootfs_stat,
/*