summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2017-12-03 19:54:41 -0600
committerBartosz Golaszewski <brgl@bgdev.pl>2017-12-06 11:22:04 +0100
commit7f6d2ecd3d7acaf205ea7b3e96f9ffc55b92298b (patch)
tree35b57c4973e745cb66aef56076285df4d1d105ee /drivers/misc
parentf9ecc83f8d723372976df8eda3193726d7a24fcb (diff)
downloadlinux-7f6d2ecd3d7acaf205ea7b3e96f9ffc55b92298b.tar.bz2
eeprom: at24: change nvmem stride to 1
Trying to read the MAC address from an eeprom that has an offset that is not a multiple of 4 causes an error currently. Fix it by changing the nvmem stride to 1. Cc: stable@vger.kernel.org Signed-off-by: David Lechner <david@lechnology.com> [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/eeprom/at24.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 20b4f26d30d7..4d63ac8a82e0 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -876,7 +876,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
at24->nvmem_config.reg_read = at24_read;
at24->nvmem_config.reg_write = at24_write;
at24->nvmem_config.priv = at24;
- at24->nvmem_config.stride = 4;
+ at24->nvmem_config.stride = 1;
at24->nvmem_config.word_size = 1;
at24->nvmem_config.size = chip.byte_len;