]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/wlags49_h2/wl_util.c
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6
[karo-tx-linux.git] / drivers / staging / wlags49_h2 / wl_util.c
index ac1e7f38f98274e67131fa6ec0c23cb07eadc649..bbdb9973d1e571fe41fe6039b1d2ec14b3af925c 100644 (file)
@@ -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
-