diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-28 22:55:39 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-29 09:27:04 +0100 |
commit | 5c9408572406c8718a35931ecf74a5cf38632914 (patch) | |
tree | cfcbe96996cb41a46334cf76f6d51d48a694397f /drivers/w1 | |
parent | 0c2431b5a15ca03e20ce3c698b8b708181db5fd9 (diff) | |
download | barebox-5c9408572406c8718a35931ecf74a5cf38632914.tar.gz barebox-5c9408572406c8718a35931ecf74a5cf38632914.tar.xz |
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 <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/slaves/w1_ds2431.c | 1 | ||||
-rw-r--r-- | drivers/w1/slaves/w1_ds2433.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/w1/slaves/w1_ds2431.c b/drivers/w1/slaves/w1_ds2431.c index 13691d7bab..6446f4ba05 100644 --- a/drivers/w1/slaves/w1_ds2431.c +++ b/drivers/w1/slaves/w1_ds2431.c @@ -260,7 +260,6 @@ out_up: static struct cdev_operations ds2431_ops = { .read = ds2431_cdev_read, .write = ds2431_cdev_write, - .lseek = dev_lseek_default, }; static int ds2431_probe(struct w1_device *dev) diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c index f521a46a75..b24fb5b3b5 100644 --- a/drivers/w1/slaves/w1_ds2433.c +++ b/drivers/w1/slaves/w1_ds2433.c @@ -159,7 +159,6 @@ out_up: static struct cdev_operations ds2433_ops = { .read = ds2433_cdev_read, .write = ds2433_cdev_write, - .lseek = dev_lseek_default, }; static int ds2433_cdev_create(struct w1_device *dev, int size, int id) |