diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-15 23:23:54 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-15 23:23:54 (GMT) |
commit | 4961e02f1999e1c3468c09b2669c94d7c3ae82a8 (patch) | |
tree | 44c15abb09d7ba5e17a9aba95ee246648b1c1a8a /drivers/staging/wlags49_h2/wl_util.c | |
parent | d14a0ebda7d3daede1a99c01527affb9ceaa4c22 (diff) | |
parent | a3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff) | |
download | linux-fsl-qoriq-4961e02f1999e1c3468c09b2669c94d7c3ae82a8.tar.xz |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/staging/wlags49_h2/wl_util.c')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_util.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/staging/wlags49_h2/wl_util.c b/drivers/staging/wlags49_h2/wl_util.c index ac1e7f3..bbdb997 100644 --- a/drivers/staging/wlags49_h2/wl_util.c +++ b/drivers/staging/wlags49_h2/wl_util.c @@ -1536,52 +1536,3 @@ int wl_get_tallies(struct wl_private *lp, return ret; } -/******************************************************************************* - * wl_atoi() - ******************************************************************************* - * - * DESCRIPTION: - * - * Believe it or not, we need our own implementation of atoi in the kernel. - * - * PARAMETERS: - * - * string - the ASCII string to convert to an integer - * - * RETURNS: - * - * unsigned integer - * - ******************************************************************************/ -unsigned int wl_atoi( char *string ) -{ -unsigned int base = 10; //default to decimal -unsigned int value = 0; -unsigned int c; -int i = strlen( string ); - - if ( i > 2 && string[0] == '0' && ( string[1] | ('X'^'x') ) == 'x' ) { - base = 16; - string +=2; - } - while ( ( c = *string++ ) != '\0' ) { - if ( value > UINT_MAX / base ) { //test for overrun - DBG_FUNC( "wl_atoi" ); //don't overload the log file with good messages - DBG_ENTER( DbgInfo ); - DBG_ERROR( DbgInfo, "string \"%s\", lenght exceeds expectations\n", string ); - printk( "<1>string \"%s\", lenght exceeds expectations\n", string ); - DBG_LEAVE( DbgInfo ); - break; - } - c -= '0'; - if ( 0 <= c && c <= 9 ) value = base * value + c; - else if ( base == 16 ) { - c += '0'; - c |= 'A'^'a'; - c = c - 'a'+ 10; - if ( 10 <= c && c <= 15 ) value = base * value + c; - } - } - return value; -} // wl_atoi - |