Commit fb10e591 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove flash related code from initvars_srom_pci()

The function initvars_srom_pci() has fallback to obtain drivers settings
from flash when no srom device is present. However, this driver does not
support flash so the fallback code can be removed.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 579c83f5
......@@ -1212,14 +1212,10 @@ static int initvars_srom_pci(struct si_pub *sih, void *curmap, char **vars,
u32 sr;
varbuf_t b;
char *vp, *base = NULL;
bool flash = false;
int err = 0;
/*
* Apply CRC over SROM content regardless SROM is present or not,
* and use variable <devpath>sromrev's existence in flash to decide
* if we should return an error when CRC fails or read SROM variables
* from flash.
* Apply CRC over SROM content regardless SROM is present or not.
*/
srom = kmalloc(SROM_MAX, GFP_ATOMIC);
if (!srom)
......@@ -1265,35 +1261,7 @@ static int initvars_srom_pci(struct si_pub *sih, void *curmap, char **vars,
err = 1;
#endif
/*
* We want internal/wltest driver to come up with default
* sromvars so we can program a blank SPROM/OTP.
*/
if (err) {
char *value;
u32 val;
val = 0;
value = ai_getdevpathvar(sih, "sromrev");
if (value) {
sromrev = (u8) simple_strtoul(value, NULL, 0);
flash = true;
goto varscont;
}
value = ai_getnvramflvar(sih, "sromrev");
if (value) {
err = 0;
goto errout;
}
{
err = -1;
goto errout;
}
}
varscont:
if (!err) {
/* Bitmask for the sromrev */
sr = 1 << sromrev;
......@@ -1319,6 +1287,7 @@ static int initvars_srom_pci(struct si_pub *sih, void *curmap, char **vars,
*vp++ = '\0';
err = initvars_table(base, vp, vars, count);
}
errout:
if (base)
......
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