]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: wlags49_h2: remove custom hex_to_bin() method
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Thu, 22 Jul 2010 16:57:10 +0000 (19:57 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Jul 2010 21:37:45 +0000 (14:37 -0700)
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/wlags49_h2/wl_util.c
drivers/staging/wlags49_h2/wl_util.h

index bbdb9973d1e571fe41fe6039b1d2ec14b3af925c..ce8ed410a7e3507640663af4dea13873057ae9b4 100644 (file)
@@ -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()
  *******************************************************************************
@@ -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++;
         }
 
index 561e85b5c9b231094f03067d88070fcdf26a3690..ba537a60059bd129fa425ca9a19db589abc079fd 100644 (file)
@@ -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 );