diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-08-16 21:30:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:19 -0700 |
commit | 37843390d1645d1d3dbc20ec6da373ac0ae5c4ed (patch) | |
tree | 21a202d2e78d1fe2779318433f49edbacfff330a /drivers/staging/rt2860/common/eeprom.c | |
parent | bf5f6ca4a855f85e2c01ca9ca7761a466db64ed5 (diff) |
Staging: rtxxx0: remove superfluous RT30xx ifdefs
* add !RT30xx version of IS_RT3090() macro
* remove superfluous RT30xx ifdefs
* unify RT30xx and !RT30xx code where possible
* kill RT28XX_UPDATE_PROTECT() macro
* remove needless variable initializations
* kill some needless function prototypes
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2860/common/eeprom.c')
-rw-r--r-- | drivers/staging/rt2860/common/eeprom.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c index d179a9f2565f..3a529667067d 100644 --- a/drivers/staging/rt2860/common/eeprom.c +++ b/drivers/staging/rt2860/common/eeprom.c @@ -73,16 +73,12 @@ USHORT ShiftInBits( RaiseClock(pAd, &x); RTMP_IO_READ32(pAd, E2PROM_CSR, &x); -#ifdef RT30xx - LowerClock(pAd, &x); //prevent read failed -#endif + + LowerClock(pAd, &x); /* prevent read failed */ + x &= ~(EEDI); if(x & EEDO) data |= 1; - -#ifndef RT30xx - LowerClock(pAd, &x); -#endif } return data; @@ -201,17 +197,13 @@ USHORT RTMP_EEPROM_READ16( x |= EECS; RTMP_IO_WRITE32(pAd, E2PROM_CSR, x); -#ifdef RT30xx // patch can not access e-Fuse issue if (!IS_RT3090(pAd)) { -#endif // kick a pulse RaiseClock(pAd, &x); LowerClock(pAd, &x); -#ifdef RT30xx } -#endif // output the read_opcode and register number in that order ShiftOutBits(pAd, EEPROM_READ_OPCODE, 3); @@ -262,17 +254,13 @@ VOID RTMP_EEPROM_WRITE16( x |= EECS; RTMP_IO_WRITE32(pAd, E2PROM_CSR, x); -#ifdef RT30xx // patch can not access e-Fuse issue if (!IS_RT3090(pAd)) { -#endif // kick a pulse RaiseClock(pAd, &x); LowerClock(pAd, &x); -#ifdef RT30xx } -#endif // output the read_opcode ,register number and data in that order ShiftOutBits(pAd, EEPROM_WRITE_OPCODE, 3); |