summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlags49_h2
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2010-07-22 19:57:10 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 14:37:45 -0700
commitff290e2307316ccea143ce4a63f4b7394dc36472 (patch)
treef7b39bbf2f8a8eeeb2f133d4abf50a2ef441b86f /drivers/staging/wlags49_h2
parent3cda5bf1df1f336b3ad78a53d92e1106d40fb241 (diff)
downloadop-kernel-dev-ff290e2307316ccea143ce4a63f4b7394dc36472.zip
op-kernel-dev-ff290e2307316ccea143ce4a63f4b7394dc36472.tar.gz
staging: wlags49_h2: remove custom hex_to_bin() method
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r--drivers/staging/wlags49_h2/wl_util.c37
-rw-r--r--drivers/staging/wlags49_h2/wl_util.h2
2 files changed, 1 insertions, 38 deletions
diff --git a/drivers/staging/wlags49_h2/wl_util.c b/drivers/staging/wlags49_h2/wl_util.c
index bbdb997..ce8ed41 100644
--- a/drivers/staging/wlags49_h2/wl_util.c
+++ b/drivers/staging/wlags49_h2/wl_util.c
@@ -259,41 +259,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++;
}
diff --git a/drivers/staging/wlags49_h2/wl_util.h b/drivers/staging/wlags49_h2/wl_util.h
index 561e85b..ba537a6 100644
--- a/drivers/staging/wlags49_h2/wl_util.h
+++ b/drivers/staging/wlags49_h2/wl_util.h
@@ -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 );
OpenPOWER on IntegriCloud