Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259745
b: refs/heads/master
c: db3cbaa
h: refs/heads/master
i:
  259743: 5d6bdda
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent b4cf313 commit 407e5c5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2c724977f95135f397fe0cb45f3c041d26b91e1
refs/heads/master: db3cbaa469a21078db8c16f5f10a95643df0e8a2
14 changes: 0 additions & 14 deletions trunk/drivers/staging/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2277,17 +2277,3 @@ bool ai_is_otp_disabled(struct si_pub *sih)
return false;
}
}

bool ai_is_otp_powered(struct si_pub *sih)
{
if (PMUCTL_ENAB(sih))
return si_pmu_is_otp_powered(sih);
return true;
}

void ai_otp_power(struct si_pub *sih, bool on)
{
if (PMUCTL_ENAB(sih))
si_pmu_otp_power(sih, on);
udelay(1000);
}
2 changes: 0 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmsmac/aiutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,6 @@ extern u32 ai_gpiocontrol(struct si_pub *sih, u32 mask, u32 val,

/* OTP status */
extern bool ai_is_otp_disabled(struct si_pub *sih);
extern bool ai_is_otp_powered(struct si_pub *sih);
extern void ai_otp_power(struct si_pub *sih, bool on);

/* SPROM availability */
extern bool ai_is_sprom_available(struct si_pub *sih);
Expand Down
15 changes: 2 additions & 13 deletions trunk/drivers/staging/brcm80211/brcmsmac/otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,7 @@ static void *ipxotp_init(struct si_pub *sih)
if (ai_is_otp_disabled(sih))
return NULL;

/* Make sure OTP is powered up */
if (!ai_is_otp_powered(sih))
return NULL;

/* OTP is always powered */
oi = &otpinfo;

/* Check for otp size */
Expand Down Expand Up @@ -518,15 +515,10 @@ void *otp_init(struct si_pub *sih)
int
otp_read_region(struct si_pub *sih, int region, u16 *data,
uint *wlen) {
bool wasup = false;
void *oh;
int err = 0;

wasup = ai_is_otp_powered(sih);
if (!wasup)
ai_otp_power(sih, true);

if (!ai_is_otp_powered(sih) || ai_is_otp_disabled(sih)) {
if (ai_is_otp_disabled(sih)) {
err = -EPERM;
goto out;
}
Expand All @@ -540,9 +532,6 @@ otp_read_region(struct si_pub *sih, int region, u16 *data,
err = (((otpinfo_t *) oh)->fn->read_region) (oh, region, data, wlen);

out:
if (!wasup)
ai_otp_power(sih, false);

return err;
}

Expand Down

0 comments on commit 407e5c5

Please sign in to comment.