Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205715
b: refs/heads/master
c: 3ff16c2
h: refs/heads/master
i:
  205713: 76b9b16
  205711: 13421aa
v: v3
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Jun 22, 2010
1 parent a3b9813 commit b81a032
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 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: 600cec3ed0a08f62712c6d3c5fea2fcb8b7e3675
refs/heads/master: 3ff16c257a103febb63a92f305043fc36c83e9ad
17 changes: 9 additions & 8 deletions trunk/drivers/staging/comedi/drivers/jr3_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Devices: [JR3] PCI force sensor board (jr3_pci)
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/kernel.h>
#include "comedi_pci.h"
#include "jr3_pci.h"

Expand Down Expand Up @@ -397,14 +398,14 @@ int read_idm_word(const u8 * data, size_t size, int *pos, unsigned int *val)
}
/* Collect value */
*val = 0;
for (; *pos < size && isxdigit(data[*pos]); (*pos)++) {
char ch = tolower(data[*pos]);
result = 1;
if ('0' <= ch && ch <= '9') {
*val = (*val << 4) + (ch - '0');
} else if ('a' <= ch && ch <= 'f') {
*val = (*val << 4) + (ch - 'a' + 10);
}
for (; *pos < size; (*pos)++) {
int value;
value = hex_to_bin(data[*pos]);
if (value >= 0) {
result = 1;
*val = (*val << 4) + value;
} else
break;
}
}
return result;
Expand Down
19 changes: 1 addition & 18 deletions trunk/drivers/staging/rtl8192su/r8192S_Efuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,22 +1848,6 @@ bool IsHexDigit( char chTmp)
}
}

//
// Description:
// Translate a character to hex digit.
//
u32 MapCharToHexDigit(char chTmp)
{
if(chTmp >= '0' && chTmp <= '9')
return (chTmp - '0');
else if(chTmp >= 'a' && chTmp <= 'f')
return (10 + (chTmp - 'a'));
else if(chTmp >= 'A' && chTmp <= 'F')
return (10 + (chTmp - 'A'));
else
return 0;
}

/*-----------------------------------------------------------------------------
* Function: efuse_ParsingMap
*
Expand Down Expand Up @@ -1917,8 +1901,7 @@ efuse_ParsingMap(char* szStr,u32* pu4bVal,u32* pu4bMove)
// Parse each digit.
do
{
(*pu4bVal) <<= 4;
*pu4bVal += MapCharToHexDigit(*szScan);
*pu4bVal = (*pu4bVal << 4) + hex_to_bin(*szScan);

szScan++;
(*pu4bMove)++;
Expand Down

0 comments on commit b81a032

Please sign in to comment.