summaryrefslogtreecommitdiffstats
path: root/drivers/eeprom
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-28 22:55:39 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-29 09:27:04 +0100
commit5c9408572406c8718a35931ecf74a5cf38632914 (patch)
treecfcbe96996cb41a46334cf76f6d51d48a694397f /drivers/eeprom
parent0c2431b5a15ca03e20ce3c698b8b708181db5fd9 (diff)
downloadbarebox-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/eeprom')
-rw-r--r--drivers/eeprom/at24.c1
-rw-r--r--drivers/eeprom/at25.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/eeprom/at24.c b/drivers/eeprom/at24.c
index e79031a2d3..1fd4aeaba6 100644
--- a/drivers/eeprom/at24.c
+++ b/drivers/eeprom/at24.c
@@ -447,7 +447,6 @@ static int at24_probe(struct device_d *dev)
at24->cdev.priv = at24;
at24->cdev.dev = dev;
at24->cdev.ops = &at24->fops;
- at24->fops.lseek = dev_lseek_default;
at24->fops.read = at24_cdev_read,
at24->fops.protect = at24_cdev_protect,
at24->cdev.size = chip.byte_len;
diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c
index a9050d6c16..1c9ef12321 100644
--- a/drivers/eeprom/at25.c
+++ b/drivers/eeprom/at25.c
@@ -235,7 +235,6 @@ static ssize_t at25_ee_write(struct cdev *cdev,
static struct cdev_operations at25_fops = {
.read = at25_ee_read,
.write = at25_ee_write,
- .lseek = dev_lseek_default,
};
static int at25_np_to_chip(struct device_d *dev,