Skip to contentSkip to conversation

eeprom: at24: make spd world-readable again

PATCH New Bartosz Golaszewski 1 participant 1 message Aug 5, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eeprom: at24: make spd world-readable again

From: Jean Delvare <[email protected]>

The integration of the at24 driver into the nvmem framework broke the world-readability of spd EEPROMs. Fix it.

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]>
[Bartosz: backported to v4.19.y]
---
 drivers/misc/eeprom/at24.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/eeprom/at24.c +1 -1
index ddfcf4ade7bf..dc3537651b80 100644
@@ -724,7 +724,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 = !(pdata.flags & AT24_FLAG_IRUGO);
 	nvmem_config.owner = THIS_MODULE;
 	nvmem_config.compat = true;
 	nvmem_config.base_dev = dev;
Signature · 1 line
2.21.0