diff options
author | David Lechner <david@lechnology.com> | 2017-12-03 19:54:41 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 10:10:21 +0100 |
commit | 6e46e964e2978f64f30b89be2423093b43e77466 (patch) | |
tree | 90f3bfc6697b8058f8d3c45bc9540f192467b571 | |
parent | e48a17d115f84048294ae366ff6e9dd7c8c6cca4 (diff) | |
download | linux-stable-6e46e964e2978f64f30b89be2423093b43e77466.tar.gz linux-stable-6e46e964e2978f64f30b89be2423093b43e77466.tar.bz2 linux-stable-6e46e964e2978f64f30b89be2423093b43e77466.zip |
eeprom: at24: change nvmem stride to 1
commit 7f6d2ecd3d7acaf205ea7b3e96f9ffc55b92298b upstream.
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.
Signed-off-by: David Lechner <david@lechnology.com>
[Bartosz: tweaked the commit message]
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/eeprom/at24.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 372b2060fbba..4cc0b42f2acc 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -776,7 +776,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; |