[PATCH] bcm43xx: fix dyn tssi2dbm memleak
[deliverable/linux.git] / drivers / net / seeq8005.c
index 79dca398f3ac3de724b74174dbfcdb583ceb0301..bcef03feb2fc571ffe5a8eaeb5f12034e03b9d3a 100644 (file)
@@ -46,6 +46,7 @@ static const char version[] =
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/bitops.h>
+#include <linux/jiffies.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -699,7 +700,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length)
        int ioaddr = dev->base_addr;
        int status = inw(SEEQ_STATUS);
        int transmit_ptr = 0;
-       int tmp;
+       unsigned long tmp;
 
        if (net_debug>4) {
                printk("%s: send 0x%04x\n",dev->name,length);
@@ -724,7 +725,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length)
        
        /* drain FIFO */
        tmp = jiffies;
-       while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0) && (jiffies - tmp < HZ))
+       while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0) && time_before(jiffies, tmp + HZ))
                mb();
        
        /* doit ! */
This page took 0.047666 seconds and 5 git commands to generate.