Skip to content

Commit

Permalink
staging: wlags49_h2: remove custom hex_to_bin() method
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent 3cda5bf commit ff290e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
37 changes: 1 addition & 36 deletions drivers/staging/wlags49_h2/wl_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,41 +258,6 @@ int is_valid_key_string( char *s )



/*******************************************************************************
* hexdigit2int()
*******************************************************************************
*
* DESCRIPTION:
*
* Converts a hexadecimal digit character to an integer
*
* PARAMETERS:
*
* c - the hexadecimal digit character
*
* RETURNS:
*
* the converted integer
*
******************************************************************************/
int hexdigit2int( char c )
{
if( c >= '0' && c <= '9' )
return c - '0';

if( c >= 'A' && c <= 'F' )
return c - 'A' + 10;

if( c >= 'a' && c <= 'f' )
return c - 'a' + 10;

return 0;
} // hexdigit2int
/*============================================================================*/




/*******************************************************************************
* key_string2key()
*******************************************************************************
Expand Down Expand Up @@ -328,7 +293,7 @@ void key_string2key( char *ks, KEY_STRCT *key )
p = (char *)key->key;

for( i = 2; i < l; i+=2 ) {
*p++ = ( hexdigit2int( ks[i] ) << 4 ) + hexdigit2int (ks[i+1] );
*p++ = (hex_to_bin(ks[i]) << 4) + hex_to_bin(ks[i+1]);
n++;
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/wlags49_h2/wl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ int is_valid_key_string( char *s );

void key_string2key( char *ks, KEY_STRCT *key );

int hexdigit2int( char c );

void wl_hcf_error( struct net_device *dev, int hcfStatus );

void wl_endian_translate_event( ltv_t *pLtv );
Expand Down

0 comments on commit ff290e2

Please sign in to comment.