diff options
author | Jean Delvare <[email protected]> | 2019-07-28 18:41:38 +0200 |
---|---|---|
committer | Bartosz Golaszewski <[email protected]> | 2019-07-28 18:49:20 +0200 |
commit | 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 (patch) | |
tree | ea06e33f3214aa932ac455fca5cc4f44b3da41dc | |
parent | 5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff) |
eeprom: at24: make spd world-readable again
The integration of the at24 driver into the nvmem framework broke the
world-readability of spd EEPROMs. Fix it.
Signed-off-by: Jean Delvare <[email protected]>
Cc: [email protected]
Fixes: 57d155506dd5 ("eeprom: at24: extend driver to plug into the NVMEM framework")
Cc: Andrew Lunn <[email protected]>
Cc: Srinivas Kandagatla <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
-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 35bf2477693d..518945b2f737 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -685,7 +685,7 @@ static int at24_probe(struct i2c_client *client) nvmem_config.name = dev_name(dev); nvmem_config.dev = dev; nvmem_config.read_only = !writable; - nvmem_config.root_only = true; + nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO); nvmem_config.owner = THIS_MODULE; nvmem_config.compat = true; nvmem_config.base_dev = dev; |