RTL8193 and DEC Tulip: Initialize the SPI EEPROM with instance.

This commit is contained in:
OBattler
2025-08-28 00:41:17 +02:00
parent fb8854e430
commit b7a01e682f
2 changed files with 5 additions and 4 deletions

View File

@@ -3294,8 +3294,8 @@ nic_init(const device_t *info)
params.nwords = 64;
params.default_content = (uint16_t *) s->eeprom_data;
params.filename = filename;
snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, device_get_instance());
s->eeprom = device_add_params(&nmc93cxx_device, &params);
snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, s->inst);
s->eeprom = device_add_inst_params(&nmc93cxx_device, s->inst, &params);
if (s->eeprom == NULL) {
free(s);
return NULL;

View File

@@ -1643,8 +1643,9 @@ nic_init(const device_t *info)
params.nwords = 64;
params.default_content = (uint16_t *) s->eeprom_data;
params.filename = filename;
snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, device_get_instance());
s->eeprom = device_add_params(&nmc93cxx_device, &params);
int inst = device_get_instance();
snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, inst);
s->eeprom = device_add_inst_params(&nmc93cxx_device, inst, &params);
if (s->eeprom == NULL) {
free(s);
return NULL;