Skip to contentSkip to conversation

misc: eeprom: at24: fix NVMEM name with custom AT24 device name

PATCH In review Diego Santa Cruz 2 participants 2 messages Dec 3, 2020 – Dec 4, 2020

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

PATCH 1/1 misc: eeprom: at24: fix NVMEM name with custom AT24 device name

When the "label" property is set on the AT24 EEPROM the NVMEM devid is set to NVMEM_DEVID_NONE, but it is not effective since there is a leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.

Fixes 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs")
---
 drivers/misc/eeprom/at24.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/eeprom/at24.c +0 -1
index 35fabaf539b7..fbf69148b5ad 100644
@@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
 
 	nvmem_config.type = NVMEM_TYPE_EEPROM;
 	nvmem_config.dev = dev;
-	nvmem_config.id = NVMEM_DEVID_AUTO;
 	nvmem_config.read_only = !writable;
 	nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
 	nvmem_config.owner = THIS_MODULE;
Signature · 1 line
2.18.4
#1 lore raw
Quoted 24 lines · Diego Santa Cruz

When the "label" property is set on the AT24 EEPROM the NVMEM devid is set to NVMEM_DEVID_NONE, but it is not effective since there is a leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.

Fixes 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs")
---
 drivers/misc/eeprom/at24.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/eeprom/at24.c +0 -2
index 35fabaf539b7..fbf69148b5ad 100644
@@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
 
        nvmem_config.type = NVMEM_TYPE_EEPROM;
        nvmem_config.dev = dev;
-       nvmem_config.id = NVMEM_DEVID_AUTO;
        nvmem_config.read_only = !writable;
        nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
        nvmem_config.owner = THIS_MODULE;
--
Quoted 2 lines

2.18.4

Goog catch, thanks. Applied to fixes.

Bartosz