put hex_to_bin back

This commit is contained in:
Matt Sealey
2011-12-20 21:38:11 -06:00
parent ded72a8511
commit 3345610229
3 changed files with 7 additions and 7 deletions

View File

@@ -2829,8 +2829,8 @@ void AtoH(char *src, u8 *dest, int destlen)
destTemp = (u8 *)dest;
while (destlen--) {
*destTemp = hex_to_bin_old(*srcptr++) << 4; /* Put 1st ascii byte in upper nibble. */
*destTemp += hex_to_bin_old(*srcptr++); /* Add 2nd ascii byte to above. */
*destTemp = hex_to_bin(*srcptr++) << 4; /* Put 1st ascii byte in upper nibble. */
*destTemp += hex_to_bin(*srcptr++); /* Add 2nd ascii byte to above. */
destTemp++;
}
}

View File

@@ -359,7 +359,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
return buf;
}
extern int hex_to_bin_old(char ch);
extern int hex_to_bin(char ch);
#ifndef pr_fmt
#define pr_fmt(fmt) fmt

View File

@@ -16,13 +16,13 @@ const char hex_asc[] = "0123456789abcdef";
EXPORT_SYMBOL(hex_asc);
/**
* hex_to_bin_old - convert a hex digit to its real value
* hex_to_bin - convert a hex digit to its real value
* @ch: ascii character represents hex digit
*
* hex_to_bin_old() converts one hex digit to its actual value or -1 in case of bad
* hex_to_bin() converts one hex digit to its actual value or -1 in case of bad
* input.
*/
int hex_to_bin_old(char ch)
int hex_to_bin(char ch)
{
if ((ch >= '0') && (ch <= '9'))
return ch - '0';
@@ -31,7 +31,7 @@ int hex_to_bin_old(char ch)
return ch - 'a' + 10;
return -1;
}
EXPORT_SYMBOL(hex_to_bin_old);
EXPORT_SYMBOL(hex_to_bin);
/**
* hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory