summaryrefslogtreecommitdiff
path: root/drivers/staging/rt2860/common/eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rt2860/common/eeprom.c')
-rw-r--r--drivers/staging/rt2860/common/eeprom.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c
index 9729323baca5..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);
@@ -1038,7 +1026,7 @@ INT set_eFuseLoadFromBin_Proc(
{
CHAR *src;
struct file *srcf;
- INT retval, orgfsuid, orgfsgid;
+ INT retval;
mm_segment_t orgfs;
UCHAR *buffer;
UCHAR BinFileSize=0;
@@ -1078,12 +1066,7 @@ INT set_eFuseLoadFromBin_Proc(
kfree(buffer);
return FALSE;
}
- /* Don't change to uid 0, let the file be opened as the "normal" user */
-#if 0
- orgfsuid = current->fsuid;
- orgfsgid = current->fsgid;
- current->fsuid=current->fsgid = 0;
-#endif
+
orgfs = get_fs();
set_fs(KERNEL_DS);
@@ -1146,10 +1129,7 @@ INT set_eFuseLoadFromBin_Proc(
DBGPRINT(RT_DEBUG_TRACE, ("--> Error %d closing %s\n", -retval, src));
}
set_fs(orgfs);
-#if 0
- current->fsuid = orgfsuid;
- current->fsgid = orgfsgid;
-#endif
+
for(j=0;j<i;j++)
{
DBGPRINT(RT_DEBUG_TRACE, ("%02X ",buffer[j]));