diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-02-26 20:59:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-01 16:55:48 -0800 |
commit | 3ccea0e1fdf896645f8cccddcfcf60cb289fdf76 (patch) | |
tree | fa1f3f4548bb67dfeb104e7de68ab360db575876 /drivers/misc/eeprom | |
parent | 57d155506dd5e8f8242d0310d3822c486f70dea7 (diff) | |
download | linux-3ccea0e1fdf896645f8cccddcfcf60cb289fdf76.tar.gz linux-3ccea0e1fdf896645f8cccddcfcf60cb289fdf76.tar.bz2 linux-3ccea0e1fdf896645f8cccddcfcf60cb289fdf76.zip |
eeprom: at25: Remove in kernel API for accessing the EEPROM
The setup() callback is not used by any in kernel code. Remove it.
Any new code which requires access to the eeprom can use the NVMEM
API.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r-- | drivers/misc/eeprom/at25.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index 3e9e5a28acaa..00f859cc0955 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -29,7 +29,6 @@ struct at25_data { struct spi_device *spi; - struct memory_accessor mem; struct mutex lock; struct spi_eeprom chip; struct bin_attribute bin; @@ -281,26 +280,6 @@ at25_bin_write(struct file *filp, struct kobject *kobj, /*-------------------------------------------------------------------------*/ -/* Let in-kernel code access the eeprom data. */ - -static ssize_t at25_mem_read(struct memory_accessor *mem, char *buf, - off_t offset, size_t count) -{ - struct at25_data *at25 = container_of(mem, struct at25_data, mem); - - return at25_ee_read(at25, buf, offset, count); -} - -static ssize_t at25_mem_write(struct memory_accessor *mem, const char *buf, - off_t offset, size_t count) -{ - struct at25_data *at25 = container_of(mem, struct at25_data, mem); - - return at25_ee_write(at25, buf, offset, count); -} - -/*-------------------------------------------------------------------------*/ - static int at25_fw_to_chip(struct device *dev, struct spi_eeprom *chip) { u32 val; @@ -415,22 +394,17 @@ static int at25_probe(struct spi_device *spi) at25->bin.attr.name = "eeprom"; at25->bin.attr.mode = S_IRUSR; at25->bin.read = at25_bin_read; - at25->mem.read = at25_mem_read; at25->bin.size = at25->chip.byte_len; if (!(chip.flags & EE_READONLY)) { at25->bin.write = at25_bin_write; at25->bin.attr.mode |= S_IWUSR; - at25->mem.write = at25_mem_write; } err = sysfs_create_bin_file(&spi->dev.kobj, &at25->bin); if (err) return err; - if (chip.setup) - chip.setup(&at25->mem, chip.context); - dev_info(&spi->dev, "%Zd %s %s eeprom%s, pagesize %u\n", (at25->bin.size < 1024) ? at25->bin.size |