summaryrefslogtreecommitdiffstats
path: root/drivers/net
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/net
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/net')
-rw-r--r--drivers/net/e1000/eeprom.c2
-rw-r--r--drivers/net/ksz8864rmn.c1
-rw-r--r--drivers/net/phy/mdio_bus.c1
3 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index c0f2db552a..01f6addbc3 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -1325,7 +1325,6 @@ exit:
static struct cdev_operations e1000_invm_ops = {
.read = e1000_invm_cdev_read,
.write = e1000_invm_cdev_write,
- .lseek = dev_lseek_default,
};
static ssize_t e1000_eeprom_cdev_read(struct cdev *cdev, void *buf,
@@ -1350,7 +1349,6 @@ static ssize_t e1000_eeprom_cdev_read(struct cdev *cdev, void *buf,
static struct cdev_operations e1000_eeprom_ops = {
.read = e1000_eeprom_cdev_read,
- .lseek = dev_lseek_default,
};
static int e1000_mtd_read_or_write(bool read,
diff --git a/drivers/net/ksz8864rmn.c b/drivers/net/ksz8864rmn.c
index 4a19dd8734..85063ff0d8 100644
--- a/drivers/net/ksz8864rmn.c
+++ b/drivers/net/ksz8864rmn.c
@@ -113,7 +113,6 @@ static ssize_t micel_switch_write(struct cdev *cdev, const void *_buf, size_t co
static struct cdev_operations micrel_switch_ops = {
.read = micel_switch_read,
.write = micel_switch_write,
- .lseek = dev_lseek_default,
};
static int micrel_switch_probe(struct device_d *dev)
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index e1dd8f0ae3..3480e2ffb4 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -392,7 +392,6 @@ static ssize_t phydev_write(struct cdev *cdev, const void *_buf, size_t count, l
static struct cdev_operations phydev_ops = {
.read = phydev_read,
.write = phydev_write,
- .lseek = dev_lseek_default,
};
static void of_set_phy_supported(struct phy_device *phydev)