Merge branch 'master'
[pandora-kernel.git] / drivers / net / wan / sdla_x25.c
index 3a93d2f..63f846d 100644 (file)
@@ -91,6 +91,7 @@
 #include <linux/wanrouter.h>   /* WAN router definitions */
 #include <linux/wanpipe.h>     /* WANPIPE common user API definitions */
 #include <linux/workqueue.h>
+#include <linux/jiffies.h>     /* time_after() macro */
 #include <asm/byteorder.h>     /* htons(), etc. */
 #include <asm/atomic.h>
 #include <linux/delay.h>       /* Experimental delay */
@@ -867,7 +868,7 @@ static int update(struct wan_device* wandev)
                if (!(card->u.x.timer_int_enabled & TMR_INT_ENABLED_UPDATE)){   
                        break;
                }
-               if ((jiffies-timeout) > 1*HZ){
+               if (time_after(jiffies, timeout + 1*HZ)){
                        card->u.x.timer_int_enabled &= ~TMR_INT_ENABLED_UPDATE;
                        return -EAGAIN;
                }
@@ -956,7 +957,7 @@ static int new_if(struct wan_device* wandev, struct net_device* dev,
                chan->hold_timeout = (conf->hold_timeout) ? 
                                        conf->hold_timeout : 10;
 
-       }else if (is_digit(conf->addr[0])){     /* PVC */
+       }else if (isdigit(conf->addr[0])){      /* PVC */
                int lcn = dec_to_uint(conf->addr, 0);
 
                if ((lcn >= card->u.x.lo_pvc) && (lcn <= card->u.x.hi_pvc)){
@@ -3874,7 +3875,7 @@ static unsigned int dec_to_uint (unsigned char* str, int len)
        if (!len) 
                len = strlen(str);
 
-       for (val = 0; len && is_digit(*str); ++str, --len)
+       for (val = 0; len && isdigit(*str); ++str, --len)
                val = (val * 10) + (*str - (unsigned)'0');
        
        return val;
@@ -3895,9 +3896,9 @@ static unsigned int hex_to_uint (unsigned char* str, int len)
        for (val = 0; len; ++str, --len)
        {
                ch = *str;
-               if (is_digit(ch))
+               if (isdigit(ch))
                        val = (val << 4) + (ch - (unsigned)'0');
-               else if (is_hex_digit(ch))
+               else if (isxdigit(ch))
                        val = (val << 4) + ((ch & 0xDF) - (unsigned)'A' + 10);
                else break;
        }