tree-wide: convert open calls to remove spaces to skip_spaces() lib function
[safe/jmp/linux-2.6] / net / irda / irnet / irnet_ppp.c
index 6d8ae03..156020d 100644 (file)
@@ -13,6 +13,8 @@
  *     2) as a control channel (write commands, read events)
  */
 
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
 #include "irnet_ppp.h"         /* Private header */
 /* Please put other headers in irnet.h - Thanks */
 
@@ -74,9 +76,8 @@ irnet_ctrl_write(irnet_socket *       ap,
       /* Look at the next command */
       start = next;
 
-      /* Scrap whitespaces before the command */
-      while(isspace(*start))
-       start++;
+       /* Scrap whitespaces before the command */
+       start = skip_spaces(start);
 
       /* ',' is our command separator */
       next = strchr(start, ',');
@@ -131,8 +132,7 @@ irnet_ctrl_write(irnet_socket *     ap,
              char *    endp;
 
              /* Scrap whitespaces before the command */
-             while(isspace(*begp))
-               begp++;
+             begp = skip_spaces(begp);
 
              /* Convert argument to a number (last arg is the base) */
              addr = simple_strtoul(begp, &endp, 16);