File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -714,23 +714,20 @@ static int at24_probe(struct i2c_client *client)
714714 }
715715
716716 /*
717- * If the 'label' property is not present for the AT24 EEPROM,
718- * then nvmem_config.id is initialised to NVMEM_DEVID_AUTO,
719- * and this will append the 'devid' to the name of the NVMEM
720- * device. This is purely legacy and the AT24 driver has always
721- * defaulted to this. However, if the 'label' property is
722- * present then this means that the name is specified by the
723- * firmware and this name should be used verbatim and so it is
724- * not necessary to append the 'devid'.
717+ * We initialize nvmem_config.id to NVMEM_DEVID_AUTO even if the
718+ * label property is set as some platform can have multiple eeproms
719+ * with same label and we can not register each of those with same
720+ * label. Failing to register those eeproms trigger cascade failure
721+ * on such platform.
725722 */
723+ nvmem_config .id = NVMEM_DEVID_AUTO ;
724+
726725 if (device_property_present (dev , "label" )) {
727- nvmem_config .id = NVMEM_DEVID_NONE ;
728726 err = device_property_read_string (dev , "label" ,
729727 & nvmem_config .name );
730728 if (err )
731729 return err ;
732730 } else {
733- nvmem_config .id = NVMEM_DEVID_AUTO ;
734731 nvmem_config .name = dev_name (dev );
735732 }
736733
You can’t perform that action at this time.
0 commit comments