Commit ca42df73 authored by Alessandro Rubini's avatar Alessandro Rubini

eeprom: don't pass redundant parameters to eeprom_match_sfp

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent c46b5b0e
......@@ -201,7 +201,7 @@ int32_t eeprom_get_sfp(uint8_t i2cif, uint8_t i2c_addr, struct s_sfpinfo * sfp,
return sfpcount;
}
int8_t eeprom_match_sfp(uint8_t i2cif, uint8_t i2c_addr, struct s_sfpinfo * sfp)
int eeprom_match_sfp(struct s_sfpinfo * sfp)
{
uint8_t sfpcount = 1;
int8_t i, temp;
......
......@@ -350,14 +350,14 @@ out:
return 0;
}
int8_t eeprom_match_sfp(uint8_t i2cif, uint8_t i2c_addr, struct s_sfpinfo * sfp)
int eeprom_match_sfp(struct s_sfpinfo * sfp)
{
uint8_t sfpcount = 1;
int8_t i, temp;
struct s_sfpinfo dbsfp;
for (i = 0; i < sfpcount; ++i) {
temp = eeprom_get_sfp(i2cif, i2c_addr,
temp = eeprom_get_sfp(i2c_params.ifnum, i2c_params.addr,
&dbsfp, 0, i);
if (!i) {
// first round: valid sfpcount is returned
......
......@@ -30,7 +30,7 @@ struct s_sfpinfo {
void eeprom_init(int i2cif, int i2c_addr);
int eeprom_sfpdb_erase(void);
int8_t eeprom_match_sfp(uint8_t i2cif, uint8_t i2c_addr, struct s_sfpinfo *sfp);
int eeprom_match_sfp(struct s_sfpinfo *sfp);
int8_t eeprom_phtrans(uint8_t i2cif, uint8_t i2c_addr, uint32_t * val,
uint8_t write);
......
......@@ -99,7 +99,7 @@ static int cmd_sfp(const char *args[])
return 0;
}
strncpy(sfp.pn, pn, SFP_PN_LEN);
if (eeprom_match_sfp(WRPC_FMC_I2C, FMC_EEPROM_ADR, &sfp) > 0) {
if (eeprom_match_sfp(&sfp) > 0) {
mprintf("SFP matched, dTx=%d, dRx=%d, alpha=%d\n",
sfp.dTx, sfp.dRx, sfp.alpha);
sfp_deltaTx = sfp.dTx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment