path: root/common/block.c
diff options
authorAndrey Smirnov <>2019-01-28 22:55:39 -0800
committerSascha Hauer <>2019-01-29 09:27:04 +0100
commit5c9408572406c8718a35931ecf74a5cf38632914 (patch)
treecfcbe96996cb41a46334cf76f6d51d48a694397f /common/block.c
parent0c2431b5a15ca03e20ce3c698b8b708181db5fd9 (diff)
devfs: Drop dev_lseek_default()
Only the following cdevs do not declare an .lseek() operation: - Console devices in common/console.c - Firmware framework in common/firmware.c - JTAG driver in drivers/misc/jtag.c - UBI in drivers/mtd/ubi/barebox.c Of those four, first two are marked DEVFS_IS_CHARACTER_DEV and implement only .write() operation and the last two don't implement anything but .ioctl(). While there's probably no meaningful way to use lseek() against any of those devices, there doesn't seem to be any harm in allowing it either. Change devfs_lseek() to ignore absense of .lseek() callback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'common/block.c')
1 files changed, 0 insertions, 1 deletions
diff --git a/common/block.c b/common/block.c
index 8d0de42..d90c989 100644
--- a/common/block.c
+++ b/common/block.c
@@ -350,7 +350,6 @@ static struct cdev_operations block_ops = {
.close = block_op_close,
.flush = block_op_flush,
- .lseek = dev_lseek_default,
int blockdevice_register(struct block_device *blk)